Tomarto
Tomarto

Reputation: 2755

AngularJS Save Browse History

I'm trying to solve a problem. I want that when a perform an action or function in the controller to be saved in the brose history. For example, I want to do this:

I have a very simple example of what I want but I don't know what do I have to add to be able to use the "back" and "forward" button from the browser.

http://jsfiddle.net/XMFua/

Thank you very much in advance!

Upvotes: 2

Views: 3393

Answers (1)

Marcello Nuccio
Marcello Nuccio

Reputation: 3901

You should use the $location service to set the URL. I don't know how to make it work on jsFiddle, however the following should work:

http://jsfiddle.net/marcenuc/BSDxG/

Upvotes: 1

Related Questions