krivaten
8/14/2016 - 2:59 AM

New Twiddle

New Twiddle

{
  "version": "0.10.4",
  "EmberENV": {
    "FEATURES": {}
  },
  "options": {
    "use_pods": false,
    "enable-testing": false
  },
  "dependencies": {
    "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
    "ember": "1.13.13",
    "ember-data": "2.7.0",
    "ember-template-compiler": "1.13.13"
  },
  "addons": {}
}
<button onclick={{action parentAction}}>This button is in my-two's template</button>
{{yield}}

{{log this}}
{{#if show}}<h2>Sleepy Sloth</h2>{{/if}}
{{yield (action 'parentAction')}}
{{#my-one as |parentAction|}}
	{{#my-two}}
    {{#my-three}}
       {{#my-four}}
        <button onclick={{action parentAction}}>This button is in my-four's yield</button>
       {{/my-four}}
     {{/my-three}}
  {{/my-two}}
{{/my-one}}
import Ember from 'ember';

export default Ember.Controller.extend({
  appName: 'Ember Twiddle'
});
import Ember from 'ember';

export default Ember.Component.extend({
});
import Ember from 'ember';

export default Ember.Component.extend({
});
import Ember from 'ember';

export default Ember.Component.extend({
  actions: {
    parentAction() {
      this.toggleProperty('show');
    }
  }
});
import Ember from 'ember';

export default Ember.Component.extend({
});