diff options
| author | Ewen Cumming | 2013-02-12 11:56:59 +1300 |
|---|---|---|
| committer | Igor Minar | 2013-02-14 15:42:51 -0800 |
| commit | 3178afbf0c46705ba8320fccc52a08730e8e05fa (patch) | |
| tree | e29a8cbfb66c09ed1e089acc8eb1b3504ea13374 | |
| parent | ce3b6164328771a7bcb05e4c1b20f0bbfc4ac440 (diff) | |
| download | angular.js-3178afbf0c46705ba8320fccc52a08730e8e05fa.tar.bz2 | |
docs($rootScope): rearrange event listener docs
| -rw-r--r-- | src/ng/rootScope.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index de1485b3..552871f7 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -619,10 +619,6 @@ function $RootScopeProvider(){ * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for discussion of * event life cycle. * - * @param {string} name Event name to listen on. - * @param {function(event, args...)} listener Function to call when the event is emitted. - * @returns {function()} Returns a deregistration function for this listener. - * * The event listener function format is: `function(event, args...)`. The `event` object * passed into the listener has the following attributes: * @@ -633,6 +629,10 @@ function $RootScopeProvider(){ * propagation (available only for events that were `$emit`-ed). * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag to true. * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called. + * + * @param {string} name Event name to listen on. + * @param {function(event, args...)} listener Function to call when the event is emitted. + * @returns {function()} Returns a deregistration function for this listener. */ $on: function(name, listener) { var namedListeners = this.$$listeners[name]; |
