You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
I'm trying to use this plugin to setup deep links on my android app, here's my code, in app.component.ts
ngAfterViewInit() {
this.platform.ready().then(() => {
this.deeplinks
.route({
'/secondaryLogin/:id': 'secondaryLogin',
'/userinfo/:id': 'userinfo',
})
.subscribe((match) => {
this.toastr.success('deeplink matched' + JSON.stringify(match));
const internalPath = `/${match.$route}/${match.$args['id']}`;
// Run the navigation in the Angular zone
this.zone.run(
() => {
this.router.navigateByUrl(internalPath);
},
(nomatch) => {
// nomatch.$link - the full link data
this.toastr.error(
"Got a deeplink that didn't match" + JSON.stringify(nomatch)
);
}
);
});
});
}
On clicking a link, the match and no match functions are never called, I'm not getting any toasters, the app opens to the home page and does not navigate.
Reacted by Quentin Stoeckel, Sayene, Aionx and StavM
To me it seems that the following commit bdd2d91 introduces an error in deeplink.js.
The change from self.routeMatch(targetPath, realPath) to self.routeMatch(pathData, realPath) makes no sense - pathData is an object and will make the call to self.routeMatch(..) to throw an exception
It seems because there is no .subscribe method chained to .route. Instead it takes three arguments where the last two arguments should be those of the .route method. Most likely a duplicate of #148
tested with passing match and nomatch functions directly to .route, still having same issue, they do not fire
To me it seems that the following commit bdd2d91 introduces an error in deeplink.js. The change from self.routeMatch(targetPath, realPath) to self.routeMatch(pathData, realPath) makes no sense - pathData is an object and will make the call to self.routeMatch(..) to throw an exception
My issue was fixed by manually switching pathData to targetPath in the plugin, thank you.
This seemed like it was working for a while for me, but lately the nomatch handler was firing inconsistently. Seems like it would stop firing after the first use. I used the instance of the object on the window rather than the angular wrapper as detailed here:
Activity
kaililleby commentedon Jun 11, 2021
To me it seems that the following commit bdd2d91 introduces an error in deeplink.js.
The change from
self.routeMatch(targetPath, realPath)toself.routeMatch(pathData, realPath)makes no sense - pathData is an object and will make the call to self.routeMatch(..) to throw an exceptionkaililleby commentedon Jun 11, 2021
@elylucas perhaps you could verify that the change in bdd2d91 is the cause of this problem?
mah-qurashy commentedon Jul 25, 2021
tested with passing match and nomatch functions directly to .route, still having same issue, they do not fire
mah-qurashy commentedon Nov 19, 2021
My issue was fixed by manually switching
pathDatatotargetPathin the plugin, thank you.jderose9 commentedon Dec 8, 2021
This seemed like it was working for a while for me, but lately the nomatch handler was firing inconsistently. Seems like it would stop firing after the first use. I used the instance of the object on the window rather than the angular wrapper as detailed here:
#148 (comment)
kaililleby commentedon Feb 25, 2022
This seems to be fixed in f5f024e