changeset 52 | 87b6a104de8e |
parent 51 | 70dff07a76ff |
child 53 | 30e7ac1ff04a |
51:70dff07a76ff | 52:87b6a104de8e |
---|---|
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 }); |