javascript - best way to implement location.path in angularjs -


as know, visit route , pass param url

$location.path('/home').search({key:'value'}) 

this clear every param , url , visit route, history keep

$location.search('').path('/home'); 

how don't keep history? transactional flow, once user paid, don't want let user able go back. know there's history service think there's more simpler way it. tried use valina javascript redirect method reloaded entire page inconsisten spa.

you can call

$location.search('').path('/home').replace(); 

and not create record in back-history of browser.

see documentation here.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -