Eduard Arevshatyan Eduard Arevshatyan - 6 months ago 49
TypeScript Question

Route on id url

I am building a table app on angular 2, and now i use a routing to navigate on my page.

I have some click event, and after clicking i am going to another page with another table, something like this (click button):

enter image description here

And after that i would to set a new adress for any "смотр.", something like this: localhost/sm1, localhost/sm2 ...

How it possible?


You have two options

1 - on the template

<div [routerLink]="['somepath',]"> </div>

2 - on your component some click event handler