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
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.