aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwen Cumming2013-02-12 11:56:59 +1300
committerIgor Minar2013-02-14 15:42:51 -0800
commit3178afbf0c46705ba8320fccc52a08730e8e05fa (patch)
treee29a8cbfb66c09ed1e089acc8eb1b3504ea13374
parentce3b6164328771a7bcb05e4c1b20f0bbfc4ac440 (diff)
downloadangular.js-3178afbf0c46705ba8320fccc52a08730e8e05fa.tar.bz2
docs($rootScope): rearrange event listener docs
-rw-r--r--src/ng/rootScope.js8
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];