Skip to content

Instantly share code, notes, and snippets.

@piotrpalek
Created February 7, 2016 21:35
Show Gist options
  • Save piotrpalek/dba33b9fca4c9635edb0 to your computer and use it in GitHub Desktop.
Save piotrpalek/dba33b9fca4c9635edb0 to your computer and use it in GitHub Desktop.
inherited computed property
import Ember from 'ember';
import CoreController from '../core/controller';
const { computed } = Ember;
export default CoreController.extend({
appName:'Ember Twiddle',
something: computed(function() {
return this._super(...arguments) + ' & new value';
})
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{something}}
<br>
<br>
import Ember from 'ember';
const { computed } = Ember;
export default Ember.Controller.extend({
something: computed(function() {
return 'core value';
})
});
{
"version": "0.5.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"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