Skip to content

Commit 3178afb

Browse files
ewenIgorMinar
authored andcommitted
docs($rootScope): rearrange event listener docs
1 parent ce3b616 commit 3178afb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng/rootScope.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,6 @@ function $RootScopeProvider(){
619619
* Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for discussion of
620620
* event life cycle.
621621
*
622-
* @param {string} name Event name to listen on.
623-
* @param {function(event, args...)} listener Function to call when the event is emitted.
624-
* @returns {function()} Returns a deregistration function for this listener.
625-
*
626622
* The event listener function format is: `function(event, args...)`. The `event` object
627623
* passed into the listener has the following attributes:
628624
*
@@ -633,6 +629,10 @@ function $RootScopeProvider(){
633629
* propagation (available only for events that were `$emit`-ed).
634630
* - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag to true.
635631
* - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
632+
*
633+
* @param {string} name Event name to listen on.
634+
* @param {function(event, args...)} listener Function to call when the event is emitted.
635+
* @returns {function()} Returns a deregistration function for this listener.
636636
*/
637637
$on: function(name, listener) {
638638
var namedListeners = this.$$listeners[name];

0 commit comments

Comments
 (0)