Forked from mapohjola/application.controller.js
Last active
October 22, 2015 07:06
-
-
Save vvsalmin/40bf89888d33cc554671 to your computer and use it in GitHub Desktop.
Component property binding
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({ | |
| appName:'Ember Twiddle' | |
| }); |
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({ | |
| test: "This is the wrong value", | |
| didInsertElement: function() { | |
| //this.set('test', 'this would work'); | |
| }, | |
| testing: function() { | |
| // this doesn't bind to application template | |
| this.set('test', 'it is working'); | |
| return "just tried to set 'test'"; | |
| }.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
| This is what I wanted |
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.11", | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "http://builds.emberjs.com/tags/v2.1.0/ember.debug.js", | |
| "ember-data": "http://builds.emberjs.com/tags/v2.1.0/ember-data.js", | |
| "ember-template-compiler": "http://builds.emberjs.com/tags/v2.1.0/ember-template-compiler.js" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment