I don't see the big win for maintainability. The logic for the decision is probably in a service. So you have to inject this service into every component and implement "canActivate" . Only for calling the service which makes the decision
Regards Am Dienstag, 22. Dezember 2015 14:41:46 UTC+1 schrieb Sander Elias: > > Hi Manfred, > > So, I did a quick check, and didn't find anything that convinces me it has > changed. > I think your use case can be quickly resolved by using the > routerCanDeactivate > <https://angular.io/docs/ts/latest/api/router/CanDeactivate-interface.html> > lifecycle method, of the component that hosts the components you don't want > to allow. > > I have gone over a large amount of use cases, and did not find a use case > that really needed global routing hooks/events. The way the router now > works, makes sure the routing is very close to the component's it is > involved with. This is a big win for maintainability. > > Regards > Sander > > -- 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 angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.