Question · Angular course · Module 4: Routing

Reading data from a resolver

How do we read the data (key 'samurai') provided by a resolver in a component?

Answer options

  • this.route.snapshot.params['samurai']
  • this.route.snapshot.data['samurai']
  • this.router.data['samurai']
  • this.route.resolve['samurai']

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