0
我正在使用Ionic 2 Deeplink插件並在真實的iOS設備上進行測試。我設法讓應用程序運行,當點擊鏈接,但應用程序不導航到所需的頁面,在這種情況下,它應該是itemPage,但應用程序直接到homePage。下面是我的代碼:Ionic 2 Deeplink:應用程序無法導航至所需頁面
Deeplinks.routeWithNavController(this.nav, {
'/items/:itemId/': this.itemPage
}).subscribe((match) => {
console.log('Deeplink: ' + JSON.stringify(match.$link))
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
console.log('Successfully matched route: ', JSON.stringify(match));
}, (nomatch) => {
// nomatch.$link - the full link data
console.error('Got a deeplink that didn\'t match', nomatch);
});
我應該認購期間添加this.nav.push(this.itemPage, itemId)
,使導航作品或有任何其他方式?