Skip to content

Angular 4 update: Behaviour of nsRouterLink has been changed slightly #724

Closed
@JohannesHoppe

Description

@JohannesHoppe

Please take a look at this simple routing example:

const routes: Routes = [
  {
    path: 'books',
    component: BookListComponent
  },
  {
    path: 'books/:isbn',
    component: BookDetailsComponent
  }
];

With the normal Angular 4 router I can navigate from books to books/XXX via this link:

<a [routerLink]="theNumber"></a>

(full example here, demo here, tested on both Angular2/Router3 and Angular4/Router4)

Before upgrading this worked fine for nativescript-angular, too:

<StackLayout [nsRouterLink]="theNumber"></StackLayout>

(full example here)

But after upgrading to nativescript-angular@1.5.0 the router cannot match any routes. I had to change the link like this:

<StackLayout [nsRouterLink]="['books', theNumber]"></StackLayout>

(full example here)

This difference between nsRouterLink and the normal routerLink is not desired , isn't it?!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions