Questions tagged [angular2-router3]
90 questions
1
vote
2 answers
Lazy loading auxiliary routes
Here the scenario,
I have a mainpage with 3 routes (child of mainpage each lazy loaded).
Here the auxiliary component has one primary outlet and other auxiliary as
and this is how my mainpage.route…

Pratik Kelwalkar
- 1,592
- 2
- 15
- 21
1
vote
1 answer
Pass top level route Id to other top level routes as is they were child routes
I have a projects overview as entry page.
When I click the open project button the projectId is passed to the Milesstones view. When I am in the milestones view I want to activate the Tasks view with the projectId.
This scenario would easily be…

Pascal
- 12,265
- 25
- 103
- 195
1
vote
1 answer
Angular 2 difference between route parameters style
If I navigate programmatically using Router's navigate method
this.router.navigate(['/articles', {id: 1}]); result url is /articles;page=1
and the second way
this.router.navigate(['/articles', id]); result url is /articles/1
In both variant I can…

Rakhat
- 4,783
- 4
- 40
- 50
1
vote
0 answers
How do I know if I need to go back 1 or 2 levels when using Angular Router 3
I had the following code {{thing.name}}. Then on the edit router I have the following...
constructor(
private route: ActivatedRoute
) {
// If we have a param the close link goes back 2…

Jackie
- 21,969
- 32
- 147
- 289
1
vote
2 answers
Insert form-component dynamically
I want to insert dynamically a form module/component containing the html and formgroup definition. The header/footer/buttons (white) are always the same. Is it possible to start the form-parent (white).

GoNode5
- 21
- 1
- 4
1
vote
1 answer
child Routing in angular2 getting error
My Page Layout look like this one
-----------------------------------------------------
HEADER MENU --> Page1
-----------------------------------------------------
Page1 Child1 |
Page1 Child2 | MAIN CONTENT
Page1 Child2…

user3799325
- 590
- 1
- 8
- 20
1
vote
1 answer
Angular2 router: how to navigate to certain path?
I have module that has its routing settings and contains some children modules. How can i navigate to certain routes from some children to parent or to other (sibling) modules?
As i see I could specify a name for the route:
{ path:'/About', name:…

smartmouse
- 13,912
- 34
- 100
- 166
1
vote
1 answer
Angular 2 router evaluating multiple route parameters
In my app I have routes with multiple parameters, e.g.
http://localhost:3000/department/6/employee/45/sales?from=20160921&to=20160928
How do I best approach evaluating these parameters? I can subscribe to params and queryParams of the…

Thorsten Westheider
- 10,572
- 14
- 55
- 97
1
vote
1 answer
Bootstrap at least one component before injecting Router
I am trying to implement Auth Service in final release of Angular 2, I had just two component : Login Component and Admin Component and I am guardin admin Component but results in following error, since I have no choice about the component to load…

Sandeep
- 121
- 10
1
vote
2 answers
angular 2 router 3.0.0-rc.1 deactivate guard protecting group of routes
I would like to create a deactivate guard that is trigerred only when navigating outside of child routes.
In rc4 ("@angular/router": "3.0.0-beta.1") this code was working as described:
path: '',
component: RootComponent,
canDeactivate:…

Olaf
- 11
- 1
- 2
1
vote
2 answers
Angular2 RC5 - route after finish loading config file
I am writing Angular2 App using RC5.
When AppComponent load, I want application to request config file using http and and once its loaded I want app to navigate to the route specified?
How can I achieve that ?
There is 'canActivate' property on…

microchip78
- 2,040
- 2
- 28
- 39
1
vote
2 answers
How do aux routes work in Angular2 RC5/Router3 RC1?
There is hardly any information regarding auxiliary routes on the web, even less so for RC5/RC1, I hope someone here on SO managed to get them to work (they are supposed to have been fixed or so I heard, but that's about it).
I got the following…

Thorsten Westheider
- 10,572
- 14
- 55
- 97
1
vote
1 answer
Angular 2 with router 3.0.0-beta.2 : is it possible to have wildcard beside children?
I would like to have a dynamic route like /parent/:id beside other /parent/child.
I tried something like this with no success:
export const routes: RouterConfig = [
{ path: '', component: HomeComponent },
{ path: 'parent', component:…

sebap
- 1,601
- 5
- 24
- 41
1
vote
1 answer
Angular RC4, One or more of providers for "App" were not defined: [?]
After update my app to angular2 to RC4 I am reciving this error. I have LoginService injected into AppComponent in new webpack starter bundle.
I was trying to inlcude AppComponent in routes, but it won't works.
Also I was including LoginService…

Dariusz Filipiak
- 2,858
- 5
- 28
- 39
1
vote
0 answers
Including causes app to hang on refresh
Reference: https://angular.io/docs/ts/latest/guide/router.html
My app builds and loads fine. When I hit F5 in any browser the app hangs: It displays "loading..." in the browser and no error message appears in the console.
By elimination I…
user3230660