server/bo_client/app/routes/index.js
author Chloe Laisne <chloe.laisne@gmail.com>
Fri, 24 Jun 2016 02:00:50 +0200
changeset 203 2ee21302dc47
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
Set application date property and filter date property observer Add color tags to filter component

import Ember from 'ember';

export default Ember.Route.extend({
  options: Ember.inject.service(),
  beforeModel: function(/*transition*/) {
    var options = this.get('options');
    if(options.docid) {
      return this.transitionTo('doc', {doc_id: options.docid});
    }
  },
  model: function() {
    return this.store.findAll('document');
  }

});