[英]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 .. 我尝试使用带有
id
this.router.navigate
在另一个组件中进行导航,但它没有给出错误,也没有导航..
here is my code https://plnkr.co/edit/E6HCvkksFPt4mK4lN6mU?p=preview 这是我的代码https://plnkr.co/edit/E6HCvkksFPt4mK4lN6mU?p=preview
moveToSecond(){
alert('----')
this.router.navigate(['/sd',{id:'ss'}]);
}
For creating a desired URL, you have use below. 要创建所需的URL,请在下面使用。
this.router.navigate(['/sd','ss']);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.