What is the convention when it comes to AngularJS directives and styling them?
Do I style via JS or stylesheet? How do I keep things self-contained and modular?
What is the convention when it comes to AngularJS directives and styling them?
Do I style via JS or stylesheet? How do I keep things self-contained and modular?
There is no convention as this is an issue with other libraries like extjs. However, in extjs, each component has a config to put styles in much like inline styles.
My approach is to include a separate css with the directive as it nicely separates the styling. And since angular directives allow separate template, your html is nicely separated from the javascript as well.