GabrielDelepine / angular-css-injector

A angularJS service to load dynamically CSS files
MIT License
152 stars 90 forks source link

Make it a directive #13

Open mr-mig opened 10 years ago

mr-mig commented 10 years ago

Why not make it a directive so that stylesheet injection become declarative and not imperative in the controller? Something like:

<ng-style src='css_from_current_module.css'><ng-style>
GabrielDelepine commented 10 years ago

It's an interesting idea. You want to write the CSS dependencies directly in the view. My approach was to managing it with the route.

If someone pull a request I will accept it.