Skip to content

Commit 17c2ad9

Browse files
committed
feat: add import with loader attribute
1 parent 6cbdfdb commit 17c2ad9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/app.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Component } from '@angular/core';
22
import { RouterOutlet } from '@angular/router';
3+
// @ts-expect-error TypeScript cannot provide types based on attributes yet
4+
import configFileContent from './app.config.ts' with { loader: 'text' };
35

46
@Component({
57
selector: 'app-root',
@@ -10,4 +12,8 @@ import { RouterOutlet } from '@angular/router';
1012
})
1113
export class AppComponent {
1214
title = 'import-attribute';
15+
16+
constructor() {
17+
console.log(configFileContent);
18+
}
1319
}

0 commit comments

Comments
 (0)