I am working on angular 5 application, and I have requirement of applying dynamic css in style tag in template. I have tried some solutions but they are not working.
app
You can use [ngStyle] directive:
[ngStyle]
This is angular 5 application
Or like so:
And in component:
applyStyles() { const styles = {'color' : 'red'}; return styles; }