cms/app-client/app/controllers/results.js
author nowmad@nowmads-macbook-pro.local
Thu, 10 Dec 2015 17:00:59 +0100
changeset 49 66739650678f
parent 41 b6815b3d46bd
permissions -rw-r--r--
update main index to add the 2 kind of menu (hash and history) and set the locationType to hash

import Ember from 'ember';

export default Ember.Controller.extend({
  queryParams: ['location'],
  location: null,
  filteredSounds: Ember.computed('location', 'model', function() {
    var location = this.get('location');
    console.log("model ? ", this.get('model'));
    var sounds = this.get('model');

    if (location) {
      return sounds.filterBy('location', location);
    } else {
      return sounds;
    }
  })
});