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 to leave the URL unchanged.)
currently i have something like this inside app.component.ts
@RouteConfig([
{
path: '/home',
name: 'Home',
component: HomeComponent,
useAsDefault: true
},
{
path: '/user/:id',
name: 'UserDetail',
component: UserDetailComponent
}
])
and inside say HomeComponent
, navigation to a user page uses the following
this._router.navigate(['UserDetail', {id: id}]);
then the url will look like http://localhost:8000/django_url/user/123
is it possible to have the url unchanged when i navigate within the Angular 2 app? so the url will stay http://localhost:8000/django_url
when a user is on page user/123
?
Thanks!