angular - Angular2 conditional routing -
this might basic question, in angular2 there way conditional routing ? or, outside router ?
i know ui-router had ability this, haven't seen similar in angular2s router
update
in new router guards can used instead https://angular.io/docs/ts/latest/guide/router.html#!#guards
original (for long gone router)
implement canactivate
lifecycle hook shown here life cycle hooks in angular2 router , return false if want prevent navigation. see https://angular.io/docs/ts/latest/api/router/canactivate-var.html
Comments
Post a Comment