angular-mobile-nav icon indicating copy to clipboard operation
angular-mobile-nav copied to clipboard

Is there any feauture for clearing just current history in $navigate navHistory ?

Open VinodLouis opened this issue 11 years ago • 4 comments

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?

VinodLouis avatar Oct 26 '13 05:10 VinodLouis

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.

ajoslin avatar Oct 28 '13 12:10 ajoslin

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 ?.....

VinodLouis avatar Oct 30 '13 05:10 VinodLouis

That sounds reasonable! Go for it :)

ajoslin avatar Nov 05 '13 15:11 ajoslin

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!....

VinodLouis avatar Nov 07 '13 09:11 VinodLouis