Hey guys, what do you think of this 
solution? http://jsfiddle.net/gabrielcatalin/cvyq0oys/

I added 2 methods: resolve() and ready() to the angular.module object, 
which will make this a bit cleaner. Still hacky I believe, but cleaner...

On Monday, December 24, 2012 6:46:54 AM UTC-5, Sergey Chico wrote:
>
> I need to load some data from server before all controllers init. Now I 
> use the resolve of $routeProvider. But this way I need to include my 
> resolve function returning promise into every resolve for every route. This 
> looks not DRY-way. Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to