onOpenNotification = function (event) {
this.events.publish('GET_MESSAGE');
})
//这段是在app.components.ts
this.event.subscribe('GET_MESSAGE', () => {
this.rootPage = MsgPage;
})
这样始终不行,请问为什么?
onOpenNotification = function (event) {
this.events.publish('GET_MESSAGE');
})
//这段是在app.components.ts
this.event.subscribe('GET_MESSAGE', () => {
this.rootPage = MsgPage;
})
这样始终不行,请问为什么?
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
你的方法使用错误,具体可以参考官方文档的写法,具体见:Navigating from the Root component