Destructuring
This commit is contained in:
parent
a52710f090
commit
8684d0d148
3 changed files with 12 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Route.extend({
|
const { Route } = Ember;
|
||||||
|
|
||||||
|
export default Route.extend({
|
||||||
model: function() {
|
model: function() {
|
||||||
return this.store.findAll('species');
|
return this.store.findAll('species');
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
const { Component, inject: { service }} = Ember;
|
||||||
currentUser: Ember.inject.service('session-account'),
|
|
||||||
|
export default Component.extend({
|
||||||
|
currentUser: service('session-account'),
|
||||||
|
|
||||||
metaData: null,
|
metaData: null,
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
const { Component } = Ember;
|
||||||
|
|
||||||
|
export default Component.extend({
|
||||||
|
species: null,
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
save: function() {
|
save: function() {
|
||||||
this.sendAction('save');
|
this.sendAction('save');
|
||||||
|
|
Reference in a new issue