ruby on rails - angular ui router, back button does cause state change -
I am using angular in Rail app and have installed Yuri-Router with many states.
Name: 'item' url: '/ items'
Child State
Name: Detailed URL: " / {Item_id: [0-9] {1,4}} / description "Parent: Item
I am using transit between states
$ state.go ('detail', item_id: id)
All except for clicking on the back button on the browser, all have to work properly.
When the back button is clicked on the place the Browser status bar correctly changes to show the unique URL of the previous position, although the Yuri-Router does not seem to change the state and I do not see any $ Do not get the state. Change Start Event
Is this UI router or have I been set up in some wrong way?
If this is normal practice then is there any way, when I click on the back button, can I change the state?
normal behavior > Is that the browser is working out of the back button box (just like we would expect) .
Try playing with this, in the console
.run (function ($ rootScope), listener / '$ stateChangeStart' $ Location) {$ RootScope $ ('$ StateChangeStart', function (event, toState, toParam) {console.log (toParams)})}}
( ... you You can navigate between some details and mimic the back button using the backspace keyboard ... all have been correctly triggerred ... Check it out
Comments
Post a Comment