aboutsummaryrefslogtreecommitdiffstats
path: root/src/bootstrap/bootstrap-prettify.js
diff options
context:
space:
mode:
authorMisko Hevery2012-05-22 16:45:56 -0700
committerMisko Hevery2012-06-02 15:44:58 -0700
commit92a2e1807657c69e1372106b0727675a30f4cbd7 (patch)
treef236f146b44c4a03cfc04e48e6dba878c74c6153 /src/bootstrap/bootstrap-prettify.js
parent8aa18f0ad036fd4f2dc26f54d80754c70232b4f7 (diff)
downloadangular.js-92a2e1807657c69e1372106b0727675a30f4cbd7.tar.bz2
feat($location): add $locatonChange[begin|completed] event
This allows location change cancelation
Diffstat (limited to 'src/bootstrap/bootstrap-prettify.js')
-rw-r--r--src/bootstrap/bootstrap-prettify.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap-prettify.js b/src/bootstrap/bootstrap-prettify.js
index e7fc1e9e..a4eb52f2 100644
--- a/src/bootstrap/bootstrap-prettify.js
+++ b/src/bootstrap/bootstrap-prettify.js
@@ -190,7 +190,12 @@ directive.ngEmbedApp = ['$templateCache', '$browser', '$rootScope', '$location',
$provide.value('$anchorScroll', angular.noop);
$provide.value('$browser', $browser);
$provide.provider('$location', function() {
- this.$get = function() { return $location; };
+ this.$get = ['$rootScope', function($rootScope) {
+ docsRootScope.$on('$locationChangeSuccess', function(event, oldUrl, newUrl) {
+ $rootScope.$broadcast('$locationChangeSuccess', oldUrl, newUrl);
+ });
+ return $location;
+ }];
this.html5Mode = angular.noop;
});
$provide.decorator('$defer', ['$rootScope', '$delegate', function($rootScope, $delegate) {