angular-mobile-nav
angular-mobile-nav copied to clipboard
Is there any feauture for clearing just current history in $navigate navHistory ?
Hello, Thanks for your wonderful plugin, I just wanted to ask you that does the plugin contains any facility of clearing (deleting current) page history only.
$navigate.eraseHistory() is going to erase all history , but i just need to erase current page navigation
example: say suppose i have navigated two pages (a.html and b.html) thus the array navHistory will contain these two pages now if i navigate to anotyher page c.html i do not want this ie(c.html) to be saved in navigation history i.e the navHistory array should contain information regarding (a.html and b.html) only c.html should not be in it.
is there any provision for doing this or what are your suggestions to achieve it?
Well we could expose navHistory and let people manipulate it, I guess.
On Oct 26, 2013, at 1:22 AM, Vinod Louis [email protected] wrote:
Hello, Thanks for your wonderful plugin, I just wanted to ask you that does the plugin contains any facility of clearing (deleting current) page history only.
$navigate.eraseHistory() is going to erase all history , but i just need to erase current page navigation
example: say suppose i have navigated two pages (a.html and b.html) thus the array navHistory will contain these two pages now if i navigate to anotyher page c.html i do not want this ie(c.html) to be saved in navigation history i.e the navHistory array should contain information regarding (a.html and b.html) only c.html should not be in it.
is there any provision for doing this or what are your suggestions to achieve it?
— Reply to this email directly or view it on GitHub.
That would be not a perfect solution, how about altering the go function to add a parameter(Boolean value) which be a deciding factor whether path should be saved or not, and if yes we shall push the path in navHistory[] else not ?.....
That sounds reasonable! Go for it :)
Hey i have done it now i have fourth parameter to decide whether to save history or not. let me know if you are interested to have a look at it. Thanks!....