I have a directive and I want to inject some CSS for that directive.
As there could be multiple directives in the same page, I want to avoid injecting that CSS multiple times. What method should I use? .run
? .config
?
Also, how exactly would I inject that CSS?
For the sake of this example, let's say that I just want to inject .my-item { background: blue; }