-
-
Save alexspeller/603a6c9daa3af08b8c74 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
var MyRoute = Ember.Route.extend({ | |
model: function() { | |
// this will resolve | |
return Ember.$.ajax().then(function(data) { | |
// then this will resolve | |
return Ember.RSVP.hash({ | |
data: data, | |
items: Em.RSVP.all([ | |
Ember.$.ajax({url: data.item1url}), | |
Ember.$.ajax({url: data.item2url}) | |
];) | |
}); | |
}) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment