Skip to content

Instantly share code, notes, and snippets.

@pswai
Created February 8, 2017 06:14
Show Gist options
  • Save pswai/0c4314f1207482a79ec463c2a49d0ef2 to your computer and use it in GitHub Desktop.
Save pswai/0c4314f1207482a79ec463c2a49d0ef2 to your computer and use it in GitHub Desktop.
Unknown Property
import Ember from 'ember';
export default Ember.Controller.extend({
unknownProperty(key) {
if (key === 'foo') {
return 'i am foo';
}
return undefined;
}
});
<div>
Value of <code>foo</code>: {{foo}}
</div>
<div>
Value of <code>bar</code>: {{bar}}
</div>
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.2",
"ember-data": "2.11.0",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment