简体   繁体   中英

why it is not navigating into another page in angular js

I am try to navigate in another component using this.router.navigate with a id but it not giving error as well as it is not navigating ..

here is my code https://plnkr.co/edit/E6HCvkksFPt4mK4lN6mU?p=preview

moveToSecond(){
    alert('----')
    this.router.navigate(['/sd',{id:'ss'}]);
  } 

For creating a desired URL, you have use below.

this.router.navigate(['/sd','ss']);

Forked Plunkr

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM