Angular 2 : routing without changing URL

后端 未结 3 721
悲哀的现实
悲哀的现实 2020-11-27 12:40

How can i route in an Angular 2 app without changing the URL? (this is because the app is located under one of several tabs on a page of a Django app, where it\'s suitable t

3条回答
  •  萌比男神i
    2020-11-27 13:11

    Finally its working in Angular2 final release. You need to pass { skipLocationChange: true } while navigating to the path i.e.

     this.router.navigateByUrl('path', { skipLocationChange: true });
    

提交回复
热议问题