cms/app-client/app/controllers/results.js
changeset 50 182f46ea5a56
parent 41 b6815b3d46bd
equal deleted inserted replaced
23:037687868bc4 50:182f46ea5a56
       
     1 import Ember from 'ember';
       
     2 
       
     3 export default Ember.Controller.extend({
       
     4   queryParams: ['location'],
       
     5   location: null,
       
     6   filteredSounds: Ember.computed('location', 'model', function() {
       
     7     var location = this.get('location');
       
     8     console.log("model ? ", this.get('model'));
       
     9     var sounds = this.get('model');
       
    10 
       
    11     if (location) {
       
    12       return sounds.filterBy('location', location);
       
    13     } else {
       
    14       return sounds;
       
    15     }
       
    16   })
       
    17 });