Forked from elwayman02/components.my-component.js
Created
January 7, 2019 23:46
Revisions
-
rwjblue revised this gist
Jan 7, 2019 . 2 changed files with 3 additions and 0 deletions.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 @@ -4,10 +4,12 @@ export default Ember.Component.extend({ init() { this._super(); this.set('bar', { foo: 'stuff' }); this.set('keys', Object.keys(Ember.get(this, 'bar'))); }, actions: { foo() { this.set('keys', Object.keys(Ember.get(this, 'bar'))); this.setProperties({ 'bar.foo': undefined }); } } 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 @@ -1,4 +1,5 @@ <p>Current Value: {{bar.foo}}</p> <p>Random Value: {{bar.random}}</p> <p>Keys: {{keys}}</p> <button {{action 'foo'}}>Click Me</button> -
elwayman02 revised this gist
Jan 7, 2019 . 1 changed file with 1 addition and 0 deletions.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 @@ -1,3 +1,4 @@ <p>Current Value: {{bar.foo}}</p> <p>Random Value: {{bar.random}}</p> <button {{action 'foo'}}>Click Me</button> -
rwjblue revised this gist
Jan 7, 2019 . 1 changed file with 2 additions and 0 deletions.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 @@ -1 +1,3 @@ <p>Current Value: {{bar.foo}}</p> <button {{action 'foo'}}>Click Me</button> -
elwayman02 created this gist
Jan 7, 2019 .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,14 @@ import Ember from 'ember'; export default Ember.Component.extend({ init() { this._super(); this.set('bar', { foo: 'stuff' }); }, actions: { foo() { this.setProperties({ 'bar.foo': undefined }); } } }); 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,5 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'Ember Twiddle' }); 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}} <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 @@ <button {{action 'foo'}}>Click Me</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.15.1", "EmberENV": { "FEATURES": {} }, "options": { "use_pods": false, "enable-testing": false }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", "ember": "3.2.2", "ember-template-compiler": "3.2.2", "ember-testing": "3.2.2" }, "addons": { "ember-data": "3.4.2" } }