Strain-details: controller -> component
This commit is contained in:
parent
20765e5dac
commit
c5b28f7204
6 changed files with 158 additions and 152 deletions
15
app/components/strains/strain-details.js
Normal file
15
app/components/strains/strain-details.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
classNames: ['grid-1'],
|
||||
isEditing: false,
|
||||
actions: {
|
||||
editStrain: function() {
|
||||
this.get('strain').get('errors').clear();
|
||||
this.toggleProperty('isEditing');
|
||||
},
|
||||
saveStrain: function() {
|
||||
this.get('strain').save().then(this.toggleProperty('isEditing'));
|
||||
}
|
||||
}
|
||||
});
|
Reference in a new issue