I'm just learning Ember.js and ran into a little snag. I have a Service where I want to call another method I have defined within the same object, like so:
export default Ember.Service.extend({
myMethod: function() { ... },
otherMethod: function() {
this.myMethod(); // <---- this doesn't work
}
});
Is there any way to do this? I would greatly like to reuse code within my codebase.
Thanks.
Aucun commentaire:
Enregistrer un commentaire