Sunday, 20 November 2022

Angular functional guard to check on the user role to guard your routes

functional guard to check on the user role  to guard your routes. 


The functional guard accepts a param for the user role 


Less verbose than a class based guard



    use canMatch to skip a route dynamically in combination with functional guards. 

  ๐Ÿ‘ Super handy when a path should lead to different comp depending on some logic 

  ๐Ÿ‘‹ canLoad is going to be deprecated in favor of canMatch


    


No comments:

Post a Comment