Skip to content

Instantly share code, notes, and snippets.

@mehrdadrafiee
Last active August 1, 2017 22:26
Show Gist options
  • Save mehrdadrafiee/45f209ba307a1d05596ede55b40a0a29 to your computer and use it in GitHub Desktop.
Save mehrdadrafiee/45f209ba307a1d05596ede55b40a0a29 to your computer and use it in GitHub Desktop.
Ember2.10
import Ember from 'ember';
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>
<li>ember-tether 0.4.0</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"}}
{{#ember-tether
target='#a-nice-person'
targetAttachment='top right'
attachment='top left'}}
{{input value=value class="form-control"}}
<p>{{value}}</p>
{{/ember-tether}}
{{/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-wormhole": "0.5.2",
"ember-tether": "0.4.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment