prime ng styles not applying angular2

前端 未结 7 1900
予麋鹿
予麋鹿 2021-01-11 20:24

Hi I just started working with angular 2. I found this library PrimeNG, I followed this tutorial: http://blog.davincisoftware.sk/primeng-web-component-framework-based-on-ang

7条回答
  •  天涯浪人
    2021-01-11 20:58

    You need to turn off encapsulation for the component.

    The basic concept is that each component hides it's styles from other component so they don't overwrite each other. You can read more about encapsulation here.

    ...
    import { ..., ViewEncapsulation } from '@angular/core';
    
    @Component {
        ...
        encapsulation: ViewEncapsulation.None,
    } ...
    

提交回复
热议问题