Created
August 12, 2013 13:34
-
-
Save knownasilya/6210836 to your computer and use it in GitHub Desktop.
Modelfor
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
App.BuildingIndexRoute = Ember.View.extend({ | |
model: function () { | |
var model = this.modelFor('building'); | |
return model; | |
} | |
}); | |
// 'building' is a route.. |
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
App.BuildingRoute = Ember.Route.extend({ | |
model: function (params) { | |
return [{ id: params.building_id, address: '200 Broadway Blvd', rating: 4 }]; | |
}, | |
renderTemplate: function () { | |
this.render({ | |
into: 'map' | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment