when I click on VEHICLES(breadcrumbs) while I am editing the page in my js I cancel the transition(as iam editing form) using the code below:
$transitions.onBefore({},function(transition){
if(current_state.includes('detail') && !$rootScope.edit_page){
return false;
}
}
Now according to the code, the transition stops but the URL in the address bar changes from
vehicle/detail/any_number
to
vehicles/list
which is URL of the Vehicles State.
It does not happen in case I click back button but breadcrumbs show this weird behavior.
Can Anyone tell how to stop this from happening?
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/03/ncy-breadcrumbs-changes-url-even-when-state-is-not-changed/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment