Я хотел бы получить содержимое файла CSS компонента.
Например:
hello-world.component.ts:
@Component({
selector: 'app-hello-world',
template: `<h1>Hello World</h1>`,
styleUrls: ['./hello-world.component.css']
})
export class HelloWorldComponent {
getCSSContent(){
}
}
привет-world.component.css:
h1 {
color: red;
font-weight: 400;
}
Я ожидаю, что функция getCSSContent вернет:
h1 {
color: red;
font-weight: 400;
}