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

preload:true crashing the page #80

Closed rojasjandro89 closed 7 years ago

rojasjandro89 commented 7 years ago

When I use preload:true the page crashes and I get the following error: Uncaught TypeError: c.get(...).error is not a function at angular-css.js:447 at Object.q [as forEach] (angular.js:357) at Object.y.preload (angular-css.js:443) at Object.$get (angular-css.js:560) at Object.invoke (angular.js:4842) at angular.js:4636 at d (angular.js:4783) at e (angular.js:4808) at Object.invoke (angular.js:4834) at angular.js:4645

I've tried using it as css object, as global config...each time y use preload:true the page crashes. I'm using angular 1.6, i read this is fully tested until version 1.5 I'm just hoping someone can give me some workaround. Also persist:false doesn't remove the css from previous route causing style leaking between different routes. Thanks in advance

rojasjandro89 commented 7 years ago

Nevermind...I found the error. The .success and .error callbacks has been deprecated. You have to use .catch instead. Thanks anyway for your effort