Open ArniDzhan opened 8 years ago
Might help if you have a plunker. Wondering if $onInit might be something you are looking for.
Might help if you have a plunker. Wondering if $onInit might be something you are looking for
thanks @winnemucca but $onInit runs after $canActivate, so doesn't work for this case. It seems that the only place to do that is in on angular.module('app').run() forcing $rootRouter to run after a service is run. I suppose if I use a service and pass through a model which can later(on canActivate or routerOnActivate) be updated and will propagate. I will update when I try that approach.
I can pass hardcoded data to component
The problem I encountered is that $routeConfig is run before controllers, canActivate etc. Would be useful to pass url param from parent route or some object with data required for that component, is there a way to do this?