Joseph Michael Pesch
VP Programming

Angular Component StyleUrls Not Working

by 16. February 2018 15:08

Issue with component level styles not working, import "ViewEncapsulation: from @angular/core and add encapsulation: ViewEncapsoulation.None to the @Component decorator as shown below.

import { Component, OnInit, ViewEncapsulation } from '@angular/core';

@Component({

    selector: 'app-demo',

    templateUrl: './demo.component.html',

    styleUrls: ['./demo.component.css'],

    encapsulation: ViewEncapsulation.None

})

Tags:

Angular | JavaScript | TypeScript

Comments are closed