Angular2 Exploring Resolved Data in canActivate Guard?

前端 未结 1 1177
被撕碎了的回忆
被撕碎了的回忆 2021-02-19 20:24

Is it possible to access resolved data of a route (-Resolver) inside a canActivate guard. Currently I can access the resolved data in the component by

ngOnInit(         


        
相关标签:
1条回答
  • 2021-02-19 20:57

    No, you can't because canActivate Method is called before resolve, so you can't get the data

    Guard Processing:

    1. canDeactivate

    2. canLoad

    3. canActivateChild

    4. canActivate

    5. resolve

    0 讨论(0)
提交回复
热议问题