Ember’s ability to automatically re-render a view when its model changes is awesome. Like “holy shit, that was basically magic” awesome. But there’s a common task that’s so similar but perplexingly more difficult. It’s using data from the model’s records in the view’s jQuery code (or really any clientside DOM library, but Ember bundles jQuery, so let’s be simple and assume jQuery).
For instance, if this is my router:
App.IndexRoute = Ember.Route.extend({
model: function(params) {
return App.Gallery.find();
},
setupController: function(controller, model) {