Created
April 7, 2017 04:30
Revisions
-
cball created this gist
Apr 7, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'Ember Twiddle', appNameFoo: Ember.computed('appName', { get() { return this.get('appName') + ' foo'; } }), appNameBar: Ember.computed('appName', function() { return this.get('appName') + ' bar'; }).readOnly(), actions: { tryFoo() { this.set('appNameFoo', 'noooooo'); }, tryBar() { this.set('appNameBar', 'noooooo'); } } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <h1>Welcome to {{appName}}</h1> <br> <br> <h2>{{appNameFoo}} - {{appNameBar}}</h2> {{outlet}} <a href="#" {{action 'tryFoo'}}>Try to set foo</a> - <a href="#" {{action 'tryBar'}}>Try to set bar</a> <br> <br> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ { "version": "0.12.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.12.0", "ember-template-compiler": "2.12.0", "ember-testing": "2.12.0" }, "addons": { "ember-data": "2.12.1" } }