-
-
Save rwjblue/a64ad0093296b87e034d8da3279ca8f5 to your computer and use it in GitHub Desktop.
Revisions
-
rwjblue revised this gist
Nov 30, 2016 . 1 changed file with 1 addition and 3 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 @@ -11,9 +11,7 @@ export default Ember.Component.extend({ actions: { addData(key) { this.set(`data.${key}`, 'foo'); } } }); -
SaladFork revised this gist
Nov 30, 2016 . 2 changed files with 4 additions and 9 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 @@ -5,13 +5,13 @@ export default Ember.Component.extend({ this._super(...arguments); this.data = { version: Ember.VERSION }; }, actions: { addData(key) { this.get('data')[key] = 'foo'; this.set('newData', ''); this.rerender(); } 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,14 +1,9 @@ {{yield}} <h3>Data</h3> <ul> {{#each-in data as |key value|}} <li> {{key}}: {{value}} </li> {{/each-in}} </ul> -
SaladFork created this gist
Nov 30, 2016 .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,19 @@ import Ember from 'ember'; export default Ember.Component.extend({ init() { this._super(...arguments); this.data = { colors: ['blue','red'] }; }, actions: { addData(key) { this.get('data')[key] = [1,2,3]; this.set('newData', ''); this.rerender(); } } }); 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.Controller.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 @@ {{my-component}} 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,20 @@ {{yield}} <h3>Data</h3> <ul> {{#each-in data as |type values|}} <li> {{type}} <ul> {{#each values as |value|}} <li>{{value}}</li> {{/each}} </ul> </li> {{/each-in}} </ul> <hr> <h4>Add Data</h4> {{input value=newData}} <button onclick={{action 'addData' newData}}> Add </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,18 @@ { "version": "0.10.6", "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.10.0", "ember-data": "2.9.0", "ember-template-compiler": "2.10.0", "ember-testing": "2.10.0" }, "addons": {} }