I am using Ionic Deeplinker for a web(browser) application in Ionic 3
Everything works great when passing params via url like this:
http://localhost:8100/#/redeem/593f2ac1e839b689d883448d
Hover, when I refresh my app, I am getting:
Uncaught (in promise): invalid link: redeem/593f2ac1e839b689d883448d
I am using the IonicPage decorator like so:
@IonicPage({
name: 'redeem',
segment: 'redeem/:id',
defaultHistory: ['reward-goals']
})
Why is it that when I refresh the page, I get that error?
PLEASE NOTE: It works fine with no param added to the route:
http://localhost:8100/#/redeem
So something about the route parameter is causing the issue.
UPDATE: when deploying my app, everything works fine but I still see the error in the console.
I found the issue. In ionics deeplinker:
And...
They need to be doing a string match on the component name. Or need to get everything up to the first / and match on that. I have filed a bug report..
****UPDATE****** I changed ionics code to this...
UrlSerializer.prototype.getLinkFromName = function (nameOrComponent) {
return this.links.find(function (link) {
return (link.component === nameOrComponent)
|| (link.name === nameOrComponent)
|| (nameOrComponent.indexOf(link.name )>-1); //added this line
});
};
And it works fine. I hope to see a patch for this in an upcoming version. Im sure this could also be place at the bottom of the index page as a patch for now..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With