Reputation: 5902
I have the following controller:
Filters.FiltersProductsController = Ember.ArrayController.extend({
needs: "filters",
filters: Ember.computed.alias("controllers.filters"),
content: function(){
return this.store.findQuery('product', this.get('filters').getFilterParams());
}.property()
});
On the initial page load it passes along the result of getFilterParams
as I want.
I have two questions:
findQuery
call is run again whenever the model data in the FiltersController
is changed?Thanks :-)
Upvotes: 0
Views: 107
Reputation: 37369
The preferred way would be to have the content
property depend on the model
property of the controller.
content: function() {
return ...
}.property('controllers.filters.model')
If the filters
controller is an array controller, you might want to watch content.@each
instead of model
.
Upvotes: 1