Skip to content

Instantly share code, notes, and snippets.

@Dhaulagiri
Last active September 29, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dhaulagiri/b3273acce03f07d2d0deff79abc01447 to your computer and use it in GitHub Desktop.
Save Dhaulagiri/b3273acce03f07d2d0deff79abc01447 to your computer and use it in GitHub Desktop.
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