Last active
December 10, 2015 14:36
-
-
Save siva-sundar/bb759103e456bbfcde02 to your computer and use it in GitHub Desktop.
toString()
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
var t = { contact: 'John', | |
toString: function() { | |
return this.contact; | |
} | |
}; | |
export default Ember.Controller.extend({ | |
name: t, | |
actions: { | |
update() { | |
var name = this.get('name'); | |
Em.set(name, 'contact', name.contact + '--'); | |
this.set('name', name); | |
console.log(this.get('name')); | |
`check your console` | |
}} | |
}); |
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.17", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"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