How to use angular 6 Route Auth Guards for all routes Root and Child Routes?

后端 未结 2 347
清歌不尽
清歌不尽 2020-12-12 22:59

How to use angular 6 Route Auth Guards for all routes Root and Child Routes ?

2条回答
  •  自闭症患者
    2020-12-12 23:45

    https://angular.io/guide/router#canactivate-requiring-authentication

    https://angular.io/guide/router#canactivatechild-guarding-child-routes

    These are really good examples from the Angular.io tutorial "Tour of Heroes" that explain really well authentication for root and child routes.

提交回复
热议问题