-
-
Save phkavitha/266c4b4249ddf5906469 to your computer and use it in GitHub Desktop.
toggleProperty bug?
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({ | |
prop1: false, | |
hello: "Default text of comp-1", | |
_changeHello: function() { | |
this.set('hello', 'Text set by comp-1'); | |
}.on("init"), | |
actions: { | |
customAction1() { | |
this.toggleProperty('prop1'); | |
} | |
} | |
}); |
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({ | |
data: [], | |
_doSomeImportentStuff: function() { | |
var data = this.get('data'); | |
data = [{name: 'Text set by comp-2', bool: false}, {name: 'Text set by comp-2', bool: true}]; | |
this.set('data', data); | |
}.on("init") | |
}); |
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.4.9", | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js", | |
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.0.1/ember.js", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.0.0/ember-data.js", | |
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.0.0/ember-template-compiler.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment