import { Deeplinks } from '@awesome-cordova-plugins/deeplinks/ngx';
constructor(private deeplinks: Deeplinks) { }
this.deeplinks.route({
'/about-us': AboutPage,
'/universal-links-test': AboutPage,
'/products/:productId': ProductPage
}).subscribe(match => {
// 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', match);
}, nomatch => {
// nomatch.$link - the full link data
console.error('Got a deeplink that didn\'t match', nomatch);
});
1条答案
按热度按时间bbuxkriu1#
你可以使用Ionic深度链接插件在你的Android应用中设置深度链接。无论是调试版本还是发布版本。
参考:https://ionicframework.com/docs/native/deeplinks
对于电容器,请遵循以下步骤:https://capacitorjs.com/docs/guides/deep-links