Last active
January 21, 2016 16:07
-
-
Save gtb104/2f0a163e02e13b67d3b9 to your computer and use it in GitHub Desktop.
myTwiddle
This file contains 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({ | |
a: [1,2,3], | |
b: [4,5,6], | |
c: false, | |
actions: { | |
toggleLabels() { | |
this.toggleProperty('c'); | |
} | |
} | |
}); |
This file contains 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({ | |
a: null, | |
b: null, | |
_b: null, | |
__b: Ember.computed('b', { | |
get() { | |
return this.get('__b'); | |
}, | |
set(key, value) { | |
console.log('processing "b"'); | |
this.set('__b', value); | |
return value; | |
} | |
}), | |
didUpdateAttrs(attrs) { | |
console.log(attrs.newAttrs, attrs.oldAttrs) | |
}, | |
didInsertElement() { | |
console.log(this.__b); | |
} | |
}); |
This file contains 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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.button { | |
border-radius: 2px; | |
border: 1px solid black; | |
background-color: grey; | |
color: white; | |
cursor: pointer; | |
padding: 4px; | |
} |
This file contains 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.5.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember.debug.js", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.2.0/ember-data.js", | |
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember-template-compiler.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment