Question · Angular course · Module 4: Routing

Reading a role from route data

How do we read the required role passed in the route's data field inside a guard?

Answer options

  • route.params['role']
  • route.data['role']
  • route.query['role']
  • route.role

You can check the correct answer by solving this task in the CodeWorlds game.