Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ember-get-2.9-beta.4
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
myObject: Ember.computed(function() {
return {
items: {
foo: "bar"
}
};
}),
item: Ember.computed(function() {
const myObject = this.get('myObject');
return Ember.get(myObject, '.items.foo');
})
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
My Item: {{item}}
{{outlet}}
<br>
<br>
{
"version": "0.10.5",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "beta",
"ember-template-compiler": "beta",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment