I'm developing an app and have almost everything figured out, except for the custom URL scheme plugin(https://github.com/EddyVerbruggen/Custom-URL-scheme). I've successfully installed the plugin and set up a custom URL scheme of signsrestaurantandbar. So when I use signsrestaurantandbar://, my application opens. The problem I'm facing is handling the URL. In the readme, it says I can use function handleOpenURL(URL) for this, but I'm still having issues trying to load a particular page within the app.
Here's what I tried:
function handleOpenURL(url) {
var strValue = url;
strValue = strValue.replace('signsrestaurantandbar://','');
window.location.href = strValue + .html;
}
I put this in my index.html page... though it should open page.html on loading signsrestaurantandbar://page, it doesn't do it properly. In my chrome console, it says it loaded the page, but it appears blank without any error and this happens only once. When I try to load signsrestaurantandbar://page the second time, it just loads the app.
I would appreciate any hints on how to approach loading particular pages using the custom URL scheme.