Angular
Angular CLI Basics - ng generate guard

ng generate guard Exercise Review

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

In the exercise for this section, you should have created two guards. The first is an auth guard, that was created in its own folder, and the interfaces should have been selected using the CLI prompt. The second was an admin guard that implemented the CanActivate interface using the --implements flag. Those commands should like similar to this:

  • ng g g auth --flat false
  • ng g guard admin --implements CanActivate
 

I finished! On to the next chapter