Created
March 30, 2015 10:40
-
-
Save vire/2ce107c3ec5545e77923 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let MyCar = Ember.Object.extend(Ember.Evented, { | |
turnLightsOn: function() { | |
this.set('lightsOn', true); | |
}.on('engineStart'), | |
turnLigthsOff: function() { | |
this.set('lightsOn', false); | |
}.on('engineStop'), | |
start: function() { | |
// do stuff | |
this.trigger('engineStart'); | |
}, | |
stop: function() { | |
// do stuff | |
this.trigger('engineStop'); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment