Skip to content

Instantly share code, notes, and snippets.

@noslouch
Last active January 30, 2017 20:36
Show Gist options
  • Save noslouch/b86adfba657f450a4d264e01a3fb0d37 to your computer and use it in GitHub Desktop.
Save noslouch/b86adfba657f450a4d264e01a3fb0d37 to your computer and use it in GitHub Desktop.
removing action in dom
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>TypeError when Removing or Rendering a Component from a nested action.</h1>
<br>
<br>
{{#unless hide}}
{{#my-component}}
<button {{action (mut hide) true}}>Click here to throw an error.</button>
{{/my-component}}
{{else}}
<button {{action (mut hide) false}}>Show the component</button>
{{/unless}}
<br>
<br>
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "canary",
"ember-data": "beta",
"ember-template-compiler": "canary",
"ember-testing": "canary"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment