From 8684d0d1481831f31ba1549db6044ca517843511 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 29 Oct 2015 17:00:13 -0700 Subject: [PATCH] Destructuring --- app/pods/protected/species/index/route.js | 4 +++- app/pods/protected/species/index/species-table/component.js | 6 ++++-- app/pods/protected/species/species-form/component.js | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/pods/protected/species/index/route.js b/app/pods/protected/species/index/route.js index 7e7714a..c30060f 100644 --- a/app/pods/protected/species/index/route.js +++ b/app/pods/protected/species/index/route.js @@ -1,6 +1,8 @@ import Ember from 'ember'; -export default Ember.Route.extend({ +const { Route } = Ember; + +export default Route.extend({ model: function() { return this.store.findAll('species'); }, diff --git a/app/pods/protected/species/index/species-table/component.js b/app/pods/protected/species/index/species-table/component.js index b0e6815..af6e952 100644 --- a/app/pods/protected/species/index/species-table/component.js +++ b/app/pods/protected/species/index/species-table/component.js @@ -1,7 +1,9 @@ import Ember from 'ember'; -export default Ember.Component.extend({ - currentUser: Ember.inject.service('session-account'), +const { Component, inject: { service }} = Ember; + +export default Component.extend({ + currentUser: service('session-account'), metaData: null, diff --git a/app/pods/protected/species/species-form/component.js b/app/pods/protected/species/species-form/component.js index a53a469..d7b34b7 100644 --- a/app/pods/protected/species/species-form/component.js +++ b/app/pods/protected/species/species-form/component.js @@ -1,6 +1,10 @@ import Ember from 'ember'; -export default Ember.Component.extend({ +const { Component } = Ember; + +export default Component.extend({ + species: null, + actions: { save: function() { this.sendAction('save');