Angular · Junior · Question 44 of 75

How do you navigate from code, for example after saving a form?

Explanation

Router.navigate takes an array of segments; navigateByUrl takes a string. Both keep the application state, unlike changing location.href.

Further reading

Problem with a question

Angular · Junior · question 44

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz