Open paulwalker opened 9 years ago
here is the solution i am using for now in case someone may be interested:
function forceNavigate($router, $rootScope) {
return function(route) {
if (!$router.navigating) return $router.navigate(route);
var stopWatching = $rootScope.$watch(
function() { return $router.navigating; },
function() {
stopWatching();
$router.navigate(route);
});
};
}
// app module .run
function run($router, $rootScope) {
$router.forceNavigate = forceNavigate($router, $rootScope);
}
$router.forceNavigate(route);
currently results in noop, which means i need to set up a watch on the navigating property. perhaps consider using a promise for the navigation events that navigate would then use?