You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$rootScope.$on('$routeChangeStart',function(event,curr,prev){if(...condition1...){event.preventDefault();// do something to get condition1 == false$route.reload();}if(...condition2...){event.preventDefault();// <-- this is not preventing// do something to get condition2 == false$route.reload();}});
Issue in source
reload: function() {
forceReload = true;
$rootScope.$evalAsync(function() {
// Don't support cancellation of a reload for now...
prepareRoute(); // <-- param is empty
commitRoute();
});
},
...
function prepareRoute($locationEvent) {
var lastRoute = $route.current;
preparedRoute = parseRoute();
preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route
&& angular.equals(preparedRoute.pathParams, lastRoute.pathParams)
&& !preparedRoute.reloadOnSearch && !forceReload;
if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {
if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {
if ($locationEvent) { <-- is undefined
$locationEvent.preventDefault();
}
}
}
}
The text was updated successfully, but these errors were encountered:
Angular version 1.3.0
Failing code
Issue in source
...
The text was updated successfully, but these errors were encountered: