Created
April 20, 2013 18:05
-
-
Save hatched/5426842 to your computer and use it in GitHub Desktop.
This file contains 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
initializer: function(cfg) { | |
// service model promise | |
cfg.service.then( | |
Y.bind(this.serviceDataReceived, this), | |
Y.bind(this.noServiceAvailable, this)); | |
this.after('modelChange', function() { | |
this.render(); | |
}, this); | |
}, | |
serviceDataReceived: function(model) { | |
// set the model with the data returned from the promise | |
this.set('model', model); | |
}, | |
noServiceAvailable: function(data) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment