prime ng styles not applying angular2

前端 未结 7 1895
予麋鹿
予麋鹿 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,
    } ...
    
    0 讨论(0)
提交回复
热议问题