Hi All, I have one requirement we are using router.naviaget for navigating to different screens but we need to make it as a deeplink url can anyone please help me with this?
Hi Shruthi, could you go into more detail on what exactly you need to do?
I am not aware of how your app is designed, but here are a few things you can do.
- check if at any point you refresh the page of your app, how the app behaves. does it retain everything’s what was there on the page earlier or not?
- check if you have implemented boot page or not. LightningJS.io - Documentation
- for deeplinking, there are few methods using which you can extract the information from url.
- set params(v) Use this method in the boot page or your 1st screen like splash
Okay @frank Thank you so much
It’s better than using window.location.href = ‘http://example.com’;
Using replace() is better because it does not keep the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco.
If you want to simulate someone clicking on a link, use window.location.href
If you want to simulate an HTTP redirect, use window.location.replace
The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the “back” button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.