Last active
November 30, 2018 20:09
-
-
Save gitKrystan/46abef18e16555576668b771c16cd45d to your computer and use it in GitHub Desktop.
Revisions
-
gitKrystan revised this gist
Nov 30, 2018 . 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 @@ -9,4 +9,5 @@ export default Ember.Controller.extend({ addOne() { this.incrementProperty('mutableProp'); } } }); -
gitKrystan created this gist
Nov 30, 2018 .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,8 @@ import Ember from 'ember'; export default Ember.Component.extend({ classNames: 'inner-component', // passed in from outer component oneWayProp: null }); 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,10 @@ import Ember from 'ember'; export default Ember.Component.extend({ classNames: 'outer-component', // passed in from application controller mutableProp: null, oneWayProp: Ember.computed.oneWay('mutableProp') }); 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,12 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'Consumerism', mutableProp: 1, actions: { addOne() { this.incrementProperty('mutableProp'); } }); 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,11 @@ body { margin: 12px 16px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12pt; } .inner-component, .outer-component { border: 1px solid salmon; padding: 5px; } 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,7 @@ <h1>Welcome to {{appName}}</h1> <button {{action "addOne"}}>+1</button> <br> <br> {{outer-component mutableProp=mutableProp}} <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,7 @@ <h2>Inner</h2> <pre><code> oneWayProp: {{oneWayProp}} </code></pre> 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,9 @@ <h2>Outer</h2> <pre><code> mutableProp: {{mutableProp}} oneWayProp: {{oneWayProp}} </code></pre> {{inner-component oneWayProp=oneWayProp}} 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.4.3", "ember-template-compiler": "3.4.3", "ember-testing": "3.4.3" }, "addons": { "ember-data": "3.4.2" } }