Question · Angular course · Module 4: Routing

The navigateByUrl method

Which Router service method do we use to navigate by passing the entire URL as a string?

Answer options

  • navigate('/samurai/123')
  • navigateByUrl('/samurai/123')
  • goTo('/samurai/123')
  • redirect('/samurai/123')

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