Questions tagged [angular2-router3]

90 questions
1
vote
3 answers

Angular 2 Routing - Router RC3

I'm trying to navigate to a page using a routerLink after getting an id, which I can get. The problem is the link is showing up as '/page;id=10/component'. I would like for it to show as '/page/10/component' (not matrix notation - no ';id=' ) In my…
1
vote
0 answers

How to render the child route into the router-outlet of the parent`s parent

AngularJS 1.x ui-router has the extreme flexible concept of viewports. They seem to me like named routes but offer much more flexibility. The routes with viewports are not divided into something like primary/aux routes. They are just put anywhere in…
Elisabeth
  • 20,496
  • 52
  • 200
  • 321
0
votes
1 answer

How to handle n number of parameter in Angular2/4 router?

In my application, there can be n number of params in the URLn and then it can have an optional following pattern too. For example, the URLs can…
0
votes
1 answer

QueryParams Not Working With Angular2 Router v 3.4.10

With Router V 3.0.0 I can do this this.router.routerState.snapshot.root.queryParams["someParameter"]; Bu I can't achieve the same with Router V 3.4.10. Any ideas?
vicmac
  • 645
  • 2
  • 6
  • 10
0
votes
1 answer

Angular 2 router send data with resolver don't work

My codes like that but don't working. I want to check user info before route loading. I use @angular/router:3.4.2 Resolver Class: @Injectable() export class UserRoleResolver implements Resolve { resolve(route: ActivatedRouteSnapshot, state:…
vangoo
  • 91
  • 1
  • 12
0
votes
3 answers

Angular 2 router navigates undefined

Every time I click on a link and a new component is loaded, the following error is thrown. The line that zone shows like responsive-height.component.ts:111 is wrong, there's no http connections in there. In previous versions of angular, this only…
Serginho
  • 7,291
  • 2
  • 27
  • 52
0
votes
1 answer

How would I create a RouteModule in Angular 2 without forRoot

I am working on going through the Style guide for Angular 2 and I happened upon this line Do end the filename of a RoutingModule with -routing.module.ts. I haven't had luck finding anything on routing module examples so I went to Papa's blog.…
Jackie
  • 21,969
  • 32
  • 147
  • 289
0
votes
1 answer

Using angular2 router3 routerLink with a material2 button or button-icon

I have a simple UI The routerLink binding above fails, always fails with the following: Can't bind…
st_clair_clarke
  • 5,453
  • 13
  • 49
  • 75
0
votes
1 answer

By clicking an item in IFrame (Inline Frame) i need to route to specific URL

Hi am using i frame in one component of my angular 2 application. Component.ts import { Component, OnInit } from '@angular/core'; import { SafeResourceUrl,DomSanitizer,} from '@angular/platform-browser'; @Component({ selector: 'sample comp', …
Aswin KV
  • 1,710
  • 2
  • 12
  • 23
0
votes
1 answer

angular 2.0.0 How to redirect after successfull login

I need to get from the router the prev URL (before the redirect to the login page) Does the Router can give me the prev URL? I found some old posts about this subject that are not relevant with the new stable router 3.0.0.
Avi
  • 1,924
  • 3
  • 17
  • 31
0
votes
1 answer

How to set routerLink queryParams to property value?

I need to set the [queryParams] for a routerLink by means of a component property, that is @Component({ ... template: '... ... }) export class MyComponent { ... …
Thorsten Westheider
  • 10,572
  • 14
  • 55
  • 97
0
votes
2 answers

How to parse url "localhost:3000/1234.xhtml" in Angular 2?

I have this situation where the links are generated by the backend like this with .xhtml extension. User can just visit this link which they are given and I need to get the 1234 from 1234.xhtml and query the database with that. Getting the query…
Parth Chokshi
  • 642
  • 4
  • 16
0
votes
1 answer

Angular 2.0.1: simplifying a complex navigation component

How do you keep a navigation component synchronized with a non-trivial application? For example, in Angular 2's simple Tour of Heroes application, the app.component.ts has static (i.e. unchanging) declarative navigation:

{{title}}

Jan Nielsen
  • 10,892
  • 14
  • 65
  • 119
0
votes
1 answer

Angular 2 Router skips redirectTo and uses child route instead

I've been tinkering with RC6 for a while now, hoping that finally routing to nested child components would work out of the box. Well, no such luck. The effect I'm seeing right now is that the redirectTo for the default route is just ignored and…
Thorsten Westheider
  • 10,572
  • 14
  • 55
  • 97
0
votes
1 answer

router.changes.subscribe deprecated in angular2 router rc2

It seems router.changes.subscribe is deprecated. What can be used in place of this? I want to do something on each router changes, so please provide me help what could be done as router.
Ashutosh Singh
  • 806
  • 1
  • 8
  • 20