Skip to main content
Filter by
Sorted by
Tagged with
398 votes
9 answers
643k views

Is there anyway to send data as parameter with router.navigate? I mean, something like this example, as you can see the route has a data parameter, but doing this it's not working: this.router....
Motomine's user avatar
  • 4,554
272 votes
14 answers
278k views

Is it possible to have an optional route parameter in the Angular 2 route? I tried the Angular 1.x syntax in RouteConfig but received below error: "ORIGINAL EXCEPTION: Path "/user/:id?" contains "?"...
Jeroen's user avatar
  • 3,613
189 votes
25 answers
316k views

I am using Angular 5. I have a dashboard where I have few sections with small content and few sections with so large content that I am facing a problem when changing router while going to top. Every ...
raihan's user avatar
  • 2,354
93 votes
4 answers
67k views

I am new to angular 4. What I'm trying to achieve is to set different layout headers and footers for different pages in my app. I have three different cases: Login, register page (no header, no footer)...
ninja dev's user avatar
  • 1,835
283 votes
14 answers
348k views

I am trying to update (add, remove) queryParams from a component. In angularJS, it used to be possible thanks to : $location.search('f', 'filters[]'); // setter $location.search()['filters[]']; // ...
Olivier's user avatar
  • 3,410
68 votes
12 answers
105k views

I'm learning Angular and I want to do tests, but I'm stuck. I've got a function: ngOnInit(): void { this.route.paramMap .switchMap((params: ParamMap) => this.SomethingService....
Daria Domagała's user avatar
26 votes
7 answers
59k views

How to open a new browser Tab , if using router.navigate . this.router.navigate([]).then(result => { window.location.href = link; });
Gobinath M's user avatar
  • 2,031
21 votes
4 answers
12k views

I'm replacing an existing AngularJS 1.6.x SPA with an Angular 5.x SPA and I want to make the change transparent to my users. I'm concerned about users who have bookmarks to the existing app because ...
Kabb5's user avatar
  • 3,900
45 votes
3 answers
84k views

I have a little problem using routes in angular 4. You know, when I am trying to pass data from a component to another using navigate('root', data), I just received [object Object],[object Object],[...
Kenry Sanchez's user avatar
43 votes
5 answers
37k views

I'm using @ngrx/router-store in my Angularv5 app and I recently started running into a an error: Navigation ID X is not equal to the current navigation id Y (where X and Y are integers). This problem ...
John's user avatar
  • 10.2k
31 votes
9 answers
29k views

Given a route config { path: '/root/:rootId', children: [{ path: '/child1/:child1Id', children: [{ path: '/child2/:child2Id component: TestComponent }]...
user2370392's user avatar
17 votes
3 answers
67k views

How to use angular 6 Route Auth Guards for all routes Root and Child Routes ?
user avatar
8 votes
2 answers
17k views

I am working on the Angular-6 project. I have many child routes for my application. One of them is as follow: const routes: Routes = [ { path: 'innovation-track/:innovation-track-id', ...
Kalpesh Shingala's user avatar
2 votes
1 answer
5k views

I need to create routes at Angular application startup based on the data received from API (site map). 1. APP_INITIALIZER calls SettingsService.loadSettings to get the data from API 2. Data comes to ...
Alex Kumundzhiev's user avatar
33 votes
2 answers
39k views

I have an Angular project with 3 components country, region, home. When I load the home page, I have route setup to HomeComponent, which hyperlinks for routes. Everything works just fine and behaving ...
Pavan Jadda's user avatar
  • 4,971
24 votes
4 answers
14k views

I have an Angular 5 application. I have the following code in my app component. I want to hide navbar and topbar for particular routes. Is it possible to get currently activated route in app....
Bmaed Riasbet's user avatar
17 votes
4 answers
51k views

How to get the current route you're in and its data, children and parent? If this is the route structure: const routes: Routes = [ {path: 'home', component: HomeComponent, data: {title: 'Home'}},...
jedion's user avatar
  • 652
10 votes
2 answers
14k views

I'm working on an Angular app where I'm faced with setting an HTML base href value, and/or an APP_BASE_HREF value. What is the difference and relation between these?
michaeljsalo's user avatar
8 votes
3 answers
24k views

I'm developing an app using Ionic 4 with Angular router. I would like to navigate to another page and clear the page stack. In Android native, it's something like this: Intent intent = new Intent(...
tyn's user avatar
  • 563
8 votes
1 answer
11k views

I'm working on a little project of mine in order to learn something more about Angular, but I really cannot figure out how to implement a multi-leveled routing. I've read the documentation about the ...
starscream's user avatar
7 votes
1 answer
2k views

My problem is that I have a lang.component loaded with <router-outlet>. What I need is to access ActivatedRoute params in the root component which is app.component but all route data there is ...
bobek's user avatar
  • 8,038
4 votes
2 answers
23k views

I just want the view to fade in and out on route change. I have setup the component correctly it seems but need to get the animation syntax correct I think. This is my current animation attempt. I ...
AngularM's user avatar
  • 16.7k
4 votes
2 answers
3k views

I am trying to use a resolver in order to retrieve data depending on the given parameters the route holds. Unfortunately, the moment I add another data stream that my data depends on the resolver ...
Philipp Meissner's user avatar
3 votes
2 answers
5k views

When navigating from within a submodule from a child route to another sibling child route, instead of the router destroying the previous component, it appends the new one on navigation forward and ...
TetraDev's user avatar
  • 17.3k
1 vote
1 answer
3k views

reason of using nested route for me is handling dynamically icon and back button for every page.i have abstract route because when i click to back button route params disappear and i put an abstract ...
Aref Zamani's user avatar
  • 2,062