Skip to content

Commit

Permalink
docs($location): document $location's events
Browse files Browse the repository at this point in the history
  • Loading branch information
olostan authored and jamesdaily committed Jan 27, 2014
1 parent 4cb818d commit 97b4f95
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,35 @@ function $LocationProvider(){
return html5Mode;
}
};

/**
* @ngdoc event
* @name ng.$location#$locationChangeStart
* @eventOf ng.$location
* @eventType broadcast on root scope
* @description
* Broadcasted before a URL will change. This change can be prevented by calling
* `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
* details about event object. Upon successful change
* {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
*
* @param {Object} angularEvent Synthetic event object.
* @param {string} newUrl New URL
* @param {string=} oldUrl URL that was before it was changed.
*/

/**
* @ngdoc event
* @name ng.$location#$locationChangeSuccess
* @eventOf ng.$location
* @eventType broadcast on root scope
* @description
* Broadcasted after a URL was changed.
*
* @param {Object} angularEvent Synthetic event object.
* @param {string} newUrl New URL
* @param {string=} oldUrl URL that was before it was changed.
*/

this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',
function( $rootScope, $browser, $sniffer, $rootElement) {
Expand Down

0 comments on commit 97b4f95

Please sign in to comment.