Issue
My website(not live yet) has employed angularjs routing. When a page lands, based on a quick condition check, it routes us to the second page. The routing takes place very quickly that, browser doesn't store the history of the first page. We have also enabled the back button functionality, which doesn't work since the history is not stored. Also, there are a couple of external links on first page which takes few seconds to load. So while these external links load, the first page appears and the condition is checked and routed to second page. Any thoughts or resolution, for forcing the browser to log the first page's history?
Other thought on this: Is there any solution to make the first page wait for all the external links to be fully loaded and then do the routing?
I've searched through Google but haven't found a solution yet. Any kind of help is much appreciated.
Solution
Angular's $location.replace() did the magic at last.
Previously I was using $location.url('/somepath') which was only redirecting to my browser's home page instead of saving first page's history.
Answered By - FlashyFuddyFuddy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.