Skip to content

Instantly share code, notes, and snippets.

@ultimatemonty
Last active March 17, 2017 13:33
Show Gist options
  • Save ultimatemonty/fc5a0f8d8d8cedc5f0f6139f6c0a901f to your computer and use it in GitHub Desktop.
Save ultimatemonty/fc5a0f8d8d8cedc5f0f6139f6c0a901f to your computer and use it in GitHub Desktop.
CP with no dependent keys test
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
now: Ember.computed(function() {
return new Date();
}),
actions: {
updateNow() {
return Ember.get(this, 'now');
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<div>{{now}}</div>
<div><button {{action 'updateNow'}}>Update</button></div>
<br>
<br>
{
"version": "0.11.1",
"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.11.0",
"ember-data": "2.11.0",
"ember-template-compiler": "2.11.0",
"ember-testing": "2.11.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment