代替
$routeChangeStart使用
$locationChangeStart
例:
$scope.$on('$locationChangeStart', function(event, next, current) { if ($scope.form.$invalid) { event.preventDefault(); }});
代替
$routeChangeStart使用
$locationChangeStart
例:
$scope.$on('$locationChangeStart', function(event, next, current) { if ($scope.form.$invalid) { event.preventDefault(); }});