Angular2 Exploring Resolved Data in canActivate Guard?

前端 未结 1 1169
被撕碎了的回忆
被撕碎了的回忆 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)
提交回复
热议问题