I'm trying to make facebook-like modal windows - for example you click on image and it opens in modal window and the url changes from /
to /img/dj27s_D
without rerendering the views and when you close the modal the url goes back to /
.
I figured out that using
var stateObj = { foo: "bar" };
history.pushState(stateObj, "page 2", "bar.html");
will just crash the application on the next $digest
. I have also tried
$location.path = '';
but nothing happens. If I execute
$location.path('/img/id')
The $routeProvider will kick in and change the views. I dont want this to happen, just want to temporary change the url while the modal is opened.