Destructuring

This commit is contained in:
Matthew Dillon 2015-10-29 17:00:13 -07:00
parent a52710f090
commit 8684d0d148
3 changed files with 12 additions and 4 deletions

View file

@ -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');
},

View file

@ -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,

View file

@ -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');