diff options
| author | Valentyn Shybanov | 2013-10-16 01:48:35 +0300 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-10-26 20:20:42 +0100 | 
| commit | dfccdd5b86a2061c8a21533eae201408fdda73f1 (patch) | |
| tree | e925e2a5ba37ae24c406d4d8af6a41d34ff453df /src/ng/location.js | |
| parent | 2cdb588b8660940bdb73c6a909a12d9c594e4b91 (diff) | |
| download | angular.js-dfccdd5b86a2061c8a21533eae201408fdda73f1.tar.bz2 | |
docs($location): document $location's events
Closes #1569
Closes #4446
Diffstat (limited to 'src/ng/location.js')
| -rw-r--r-- | src/ng/location.js | 29 | 
1 files changed, 29 insertions, 0 deletions
| diff --git a/src/ng/location.js b/src/ng/location.js index abb6135a..e9cefe4e 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -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) { | 
