CanActivate vs. CanActivateChild with component-less routes

后端 未结 6 1151
傲寒
傲寒 2020-12-12 18:17

The angular2 documentation about Route Guards left me unclear about when it is appropriate to use a CanActivate guards vs. a CanActivateChild guard

6条回答
  •  抹茶落季
    2020-12-12 18:37

    What if you have 10 children defined.

    Then canActivateChild only needs to go in one place if they all have a common requirement, as opposed to 10 canActivate on each child.

提交回复
热议问题