I'd like to put a conditional styling on a primeng 'p-overlayPanel' element. I have tried:
<p-overlayPanel [styleClass]="#{(bean.comment) ? 'style1' : 'style2'}">, but it's not working.[ng-class]="bean.comment ? 'style1' : 'style2'"- this is not working either.
Styleclass works only without a condition like so:
<p-overlayPanel [styleClass]="style1">// html filep-overlayPanel .style1.ui-overlay { background-color: yellow; }// css file
While [ng-class] doesn't work at all (but works fine on vanilla JS elements). Have I missed something? My questions are following:
- Is 'ng-class' not working for some of the elements from ngPrime collection?
- How to correctly conditionally apply 'styleClass' for
p-overlayPanelelement? I'm using Angular 8.