1.

How you can load external css style?

Answer»

To ALLOW a load of external CSS styles in Angular 2 to affect component contents, we have to change view ENCAPSULATION which presents styles to COMPONENTS referring “bleed into”.

@Component({
   selector: 'some-component',
   template: '&LT;div&GT;</div>',
   styleUrls: [
      'https://bestinterviewquestion.com/style.css',
      'app/local.css'
   ],
   encapsulation: ViewEncapsulation.None,
})
export class SomeComponent {}



Discussion

No Comment Found