send (name, args) public
Sends an action to the router, which will delegate it to the currently active route hierarchy per the bubbling rules explained under actions
.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | App.Router.map( function () { this .route( 'index' ); }); App.ApplicationRoute = Ember.Route.extend({ actions: { track: function (arg) { console.log(arg, 'was clicked' ); } } }); App.IndexRoute = Ember.Route.extend({ actions: { trackIfDebug: function (arg) { if (debug) { this .send( 'track' , arg); } } } }); |
Parameters:
-
name
String
- the name of the action to trigger
-
args
...*
Please login to continue.