Created
April 13, 2017 23:37
Revisions
-
sglanzer created this gist
Apr 13, 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,4 @@ import Ember from 'ember'; export default Ember.Component.extend({ }); 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', foo: Ember.computed(function() { return { bar: this.bar.bind(this), baz: this.actions.baz.bind(this) } }), bar () { alert('bar') }, actions: { baz () { alert('baz') } } }); 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,6 @@ <h1>Welcome to {{appName}}</h1> <br> <br> {{my-component foo=foo}} <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,2 @@ <button {{action foo.bar}}>Bar</button> <button {{action foo.baz}}>Baz</button> 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" } }