Ionic2 离子2中的Deeplink不工作
我正在按照这里解释的程序尝试与离子2的深度链接 首先,我使用,Ionic2 离子2中的Deeplink不工作,ionic2,deep-linking,Ionic2,Deep Linking,我正在按照这里解释的程序尝试与离子2的深度链接 首先,我使用, 爱奥尼亚插件添加爱奥尼亚插件深度链接——变量URL\u SCHEME=http——变量DEEPLINK\u HOST=cityknots.com 然后在我的app.component.ts中 export class MyApp { rootPage = Wrapper; constructor(platform:Platform) { platform.ready().then(() => { //
爱奥尼亚插件添加爱奥尼亚插件深度链接——变量URL\u SCHEME=http——变量DEEPLINK\u HOST=cityknots.com
然后在我的app.component.ts中
export class MyApp {
rootPage = Wrapper;
constructor(platform:Platform) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Deeplinks.route({
'/test': UserHome
}).subscribe((match) => {
console.log('Successfully routed', match);
}, (nomatch) => {
console.warn('Unmatched Route', nomatch);
});
});
}
}
我尝试点击url(在ios模拟器的浏览器(safari)中)在我构建并运行应用程序之后,但什么都没有发生。我希望应用程序应该启动并导航到
UserHome
组件。控制台中没有任何与此相关的内容。尝试https
with URL\u SCHEME=httpsit。它不适用于https-tooHi@Anik,你真的解决了这个问题吗?请分享这是如何解决的谢谢。我必须使用重定向来解决这个问题,所以当移动应用程序点击url时,我会从我的服务器重定向到example://etc/etc 在这个url中,应用程序triggersI发现最好对Ionic使用格式{'/test':'UserHome'}
,因为加载页面组件很慢。