Skip to content

Instantly share code, notes, and snippets.

@mehrdadrafiee
Created August 2, 2017 00:28
Show Gist options
  • Save mehrdadrafiee/912e88c5680f73bc90bbd7c9ab1d5413 to your computer and use it in GitHub Desktop.
Save mehrdadrafiee/912e88c5680f73bc90bbd7c9ab1d5413 to your computer and use it in GitHub Desktop.
New Twiddle
export default Ember.Controller.extend({
appName: 'Ember 2.10.2',
showInput: false,
value: null,
actions: {
showInput() {
this.set('showInput', true);
}
}
});
<h1>Welcome to {{appName}}</h1>
Installed addons:
<br>
<ul>
<li>ember-wormhole 0.5.2</li>
</ul>
<br>
<br>
<div id="destination">
<div id="a-nice-person" style="border: 1px; border-style: solid;">
id="destination"
</div>
</div>
{{#if showInput}}
{{#ember-wormhole to="destination"}}
{{input value=value class="form-control"}}
<p>{{value}}</p>
{{/ember-wormhole}}
{{/if}}
<button {{action "showInput"}}>show input</button>
{{outlet}}
<br>
<br>
{
"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.10.2",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {
"ember-data": "2.12.1",
"ember-wormhole": "0.5.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment