Skip to main content
added 547 characters in body
Source Link
Gal Margalit
  • 5.9k
  • 6
  • 57
  • 60

2022
Utilize your app routing - more of an "angular approach" rather than accessaccessing the browser's location object for navigation history. Think of why you need the user to go 'back', and what 'back' means in the broader context of your application and its routes.

for example, returning to a parent route from its child

  this.router.navigate(['..'], {relativeTo: this.route});

You can also read about previous navigation

previousNavigation : The previously successful Navigation object. Only one previous navigation is available, therefore this previous Navigation object has a null value for its own previousNavigation.

2022
Utilize your app routing - more of an "angular approach" rather than access the browser's location object

  this.router.navigate(['..'], {relativeTo: this.route});

2022
Utilize your app routing - more of an "angular approach" rather than accessing the browser's location object for navigation history. Think of why you need the user to go 'back', and what 'back' means in the broader context of your application and its routes.

for example, returning to a parent route from its child

  this.router.navigate(['..'], {relativeTo: this.route});

You can also read about previous navigation

previousNavigation : The previously successful Navigation object. Only one previous navigation is available, therefore this previous Navigation object has a null value for its own previousNavigation.

Source Link
Gal Margalit
  • 5.9k
  • 6
  • 57
  • 60

2022
Utilize your app routing - more of an "angular approach" rather than access the browser's location object

  this.router.navigate(['..'], {relativeTo: this.route});