Reputation: 3688
I have some directives in my application which are loaded only in certain components. Currently all the styles related to these directives are globally defined in style.css.
Instead of adding these styles globally, is there a way I can hook separate style URLs for directive just like how we do in components.
e.g
@Directive ({
selector: '[foobar]',
styleUrls: [
'foobar.directive.css'
]
})
Upvotes: 4
Views: 7773
Reputation: 658037
There is no way to add styles to directives, only to components.
See also
Upvotes: 5