【发布时间】:2019-05-07 17:10:06
【问题描述】:
我正在尝试在导航到另一个页面时将数据发送到另一个页面。
this.router.navigateByUrl('/homePage', { fragment:"hello world"});
我不确定如何在我的主页中接收我的片段。 我在我的主页下面尝试了他的内容。
ngOnInit() {
this.router.fragment.subscribe((fragment: any) => {
console.log("My hash fragment is here => ", fragment)
})
}
我越来越不确定我不确定如何接收片段任何帮助...
【问题讨论】:
标签: angular ionic4 angular7-router