Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 027f20b

Browse files
ewenIgorMinar
authored andcommittedFeb 14, 2013
docs($rootScope): rearrange event listener docs
1 parent 9b7c1d0 commit 027f20b

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
@@ -627,10 +627,6 @@ function $RootScopeProvider(){
627627
* Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for discussion of
628628
* event life cycle.
629629
*
630-
* @param {string} name Event name to listen on.
631-
* @param {function(event, args...)} listener Function to call when the event is emitted.
632-
* @returns {function()} Returns a deregistration function for this listener.
633-
*
634630
* The event listener function format is: `function(event, args...)`. The `event` object
635631
* passed into the listener has the following attributes:
636632
*
@@ -641,6 +637,10 @@ function $RootScopeProvider(){
641637
* propagation (available only for events that were `$emit`-ed).
642638
* - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag to true.
643639
* - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
640+
*
641+
* @param {string} name Event name to listen on.
642+
* @param {function(event, args...)} listener Function to call when the event is emitted.
643+
* @returns {function()} Returns a deregistration function for this listener.
644644
*/
645645
$on: function(name, listener) {
646646
var namedListeners = this.$$listeners[name];

0 commit comments

Comments
 (0)
This repository has been archived.