Functional router guards Together with the tree-shakable standalone router APIs we worked on reducing boilerplate in guards! With the new functional router guards, you can refactor code down to:
12
69
451
0
32
Download Image
We expressed the entire guard within the guard declaration. Functional guards are also composable - you can create factory-like functions that accept a configuration and return a guard or resolver function. You can find an example for running router guards serially on GitHub.
@angular Very cool! That really simplifies that part.
@angular I am a junior dev working in react.js and this looks scary to me
@angular Ready to see some SSR routes like other frameworks!
@angular Already loving the functional routes, thanks to the angular team