Skip to content

Instantly share code, notes, and snippets.

@mikemunsie
Created October 13, 2017 20:54
Show Gist options
  • Save mikemunsie/b6287448a1a1055e9373a22f7e8057f8 to your computer and use it in GitHub Desktop.
Save mikemunsie/b6287448a1a1055e9373a22f7e8057f8 to your computer and use it in GitHub Desktop.
Can Ember Nested Routes Do This?
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
alert('yep');
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<input type='radio' name='r1' onclick={{action (mut visible) true}} /> Make Visible
<input type='radio' name='r1' onclick={{action (mut visible) false}} /> Hide
{{#if visible}}
{{my-component}}
{{/if}}
{
"version": "0.12.1",
"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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment