I have a component with a stylesheet that loads correctly like this:
@Component({
selector: \'open-account\',
styleUrls: [\'open-account.component.scss\'
The only way I found it works is to do this:
addStyleSheet() {
var headID = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.id = 'widget_styles';
headID.appendChild(link);
link.href = './app/open-account/open-account-widget-styles.component.css';
}
ngOnInit() {
this.addStyleSheet();
}