Questions tagged [angular2-router3]

90 questions
0
votes
1 answer

Angular2 Router 3.0 - Setting up multi-features (multi sections) routing

I'm making a website with two main sections, public section and the control panel so I'm trying to make something like this (from angular.io): here's my code: (it's working) app/main.ts: import { platformBrowserDynamic } from…
Motassem MK
  • 1,502
  • 3
  • 17
  • 40
0
votes
2 answers

Is multiple required parameters support in Angular2 router

Like: /profiles/:category/:profileSlug/:page Because I cannot generate URL with [routerLink]="['/profiles', {category: 'president', profileSlug: 'obama', page: 1}]" returns unexpected result in matrix query format So in Router3 I must hard the…
tom10271
  • 3,030
  • 4
  • 25
  • 42
0
votes
1 answer

Angular 2 routes current url with params

I'm trying to use Angular 2 rc-4 with new Router. export const appRoutes: RouterConfig =[ { path: "", component: HomeComponent, terminal: true, data: { title: "Home" } }, { path: "Users", …
0
votes
1 answer

How do I async load a component with AsyncRoute in Webpack?

I'm lost with my understanding, how to bring async module loading to run in latest angular-webpack-starter (RC4 with @angular/router 3.0.0-beta.2). There is an example included, but it would be helpful to get more explanation, what to do and how…
westor
  • 1,116
  • 1
  • 11
  • 31
0
votes
0 answers

Optional route params, NOT query params (@angular/router 3)

More often than not, in a project, certain routes are a requirement, not a developer choice. That said, I agree to those routes too, in the detriment of query params (so called GET variables in php or other server-side languages). There is a similar…
MrCroft
  • 2,729
  • 1
  • 29
  • 48
0
votes
1 answer

RouteConfig function not found in angular2 rc4 issue (plain JS)

After upgrading to RC4 I have this issue configuring router: ng.router.RouteConfig is not a function I am using plain JavaScript. This is how I bootstrap: ng.platform.browser.bootstrap(AppComponent,[ ng.router.ROUTER_PROVIDERS, new…
0
votes
1 answer

Angular 2 RC4 Router get intended route before activated

I am trying to determine what the route is before it is activated so I can cache it and redirect the user back to that route after they have logged in. In the old beta router I was able to call ComponentInstruction.routeName in the activate hook but…
Mark Letters
  • 293
  • 5
  • 14
0
votes
1 answer

Angular 2 Router 3.0.0 Nested Routes Compiling

I seem to be having a problem with Angular 2's new Router 3.0.0-alpha.8. Long story short, my app.routes.ts is export const routes: RouterConfig = [ { path: '', component: HomeComponent, canActivate: [AuthGuard] }, { path: 'login',…
rgrambo
  • 127
  • 1
  • 1
  • 8
0
votes
1 answer

RouterLink don't adds href at first load from parent page template

I have root page with child pages, root page template has [routerLink] directives that route to child pages. Something like this: HomeComponуnt has ROUTER_DIRECTIVES in…
Lyubimov Roman
  • 1,239
  • 14
  • 26
0
votes
2 answers

Angular2 rc3 injecting router into tests

Since I upgraded to Angular2 rc3 any tests that need the Router injected are now failing. Previously I was using the ROUTER_FAKE_PROVIDERS available from the router/testing file but that doesn't seem to exist any longer. Any suggestions?
HomeBrew
  • 841
  • 2
  • 12
  • 24
0
votes
1 answer

"child" Route path should include parent route path

Thats my route config: export const SchoolyearsRoutes: RouterConfig = [ { path:'', terminal:true, redirectTo: '/schoolyears'}, { path: 'schoolyears', component: SchoolyearsListComponent }, { path: 'schoolyears/edit/:id', component:…
Elisabeth
  • 18,252
  • 48
  • 179
  • 303
0
votes
1 answer

Register router directives globally with angular router rc3

I do not want to register the Router_Directives for every component. I want to do it globally as I did before: import { RouterConfig ,Router, ActivatedRoute, ROUTE_PROVIDERS} from '@angular/router'; bootstrap(AppComponent, [APP_ROUTER_PROVIDERS,…
Elisabeth
  • 18,252
  • 48
  • 179
  • 303
0
votes
1 answer

Angular2 router 3.0.0-alfa7. Can't navigate to route

Angular2 version: rc3 Router version: 3.0.0-alfa7 boot.ts: import { provideRouter, RouterConfig } from '@angular/router'; import {AppComponent} from "./main/app.component" import {UsersComponent, UserListComponent, UserEditComponent} from…
forik
  • 149
  • 4
  • 15
0
votes
1 answer

Why has CrisisCenterRoutes a Children property and HeroesRoutes not?

When you look at the angular 2 heroes sample: http://plnkr.co/edit/Zd0qmavTzedtimImAgfQ?p=preview There is the CrisisCenter and Heroes link Both render a list of things or you can edit the thing by id. But the RoutesConfig is totally different aside…
Pascal
  • 10,107
  • 18
  • 83
  • 180
-1
votes
2 answers

What are Router Bindings actually used for

What are Router Bindings actually used for in Angular2 router. specially the Router 3.0 (newest Angular RC4 router)? Any working code or plunker? https://angular.io/docs/ts/latest/api/router-deprecated/index/ROUTER_BINDINGS-let.html
Gary
  • 2,027
  • 2
  • 21
  • 42
1 2 3 4 5
6