Created
September 29, 2016 16:25
-
-
Save nightire/aa5726e3e6461a7932a902bf31c03f6b to your computer and use it in GitHub Desktop.
Why is Zero???
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
foo: 0, | |
actions: { | |
toggle(property) { | |
this.incrementProperty(property); | |
}, | |
reset(property) { | |
this.set(property, 0); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didReceiveAttrs() { | |
this._super(...arguments); | |
console.log('Receive: ', this.get('unboundFoo')); | |
}, | |
didUpdateAttrs() { | |
this._super(...arguments); | |
console.log('Update: ', this.get('unboundFoo')); | |
}, | |
actions: { | |
update(property) { | |
this.incrementProperty(property); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.10.5", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": true, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js", | |
"ember": "beta", | |
"ember-data": "beta", | |
"ember-template-compiler": "beta", | |
"ember-testing": "beta" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment