castillo-io / angular-css

CSS on-demand for AngularJS [Looking for New Maintainers]
http://castillo-io.github.io/angular-css/#/
MIT License
470 stars 86 forks source link

hook add event on ngRoute and ui.router #13

Closed enricolucia closed 9 years ago

enricolucia commented 9 years ago

Hook added on ngRoute and ui.router object to wait for resolve object.

alexcastillo commented 9 years ago

Hi @enricolucia

Thanks for the PR!

The intention of issues #6 and #7 is to make sure that the stylesheets are loaded before the route is changed in order to avoid a flash of unstyled content (FOUC).

My theory is that we can accomplish that via route resolve.

Does that make sense?

enricolucia commented 9 years ago

Oh I see it. Ok I think is pretty doable from route resolve.I will have a look at it.

alexcastillo commented 9 years ago

Yes, it's doable. I guess the challenge is to do it internally in the service and making sure it doesn't override any other resolve functionality added by the user.