Skip to content

Instantly share code, notes, and snippets.

@jenweber
Created May 25, 2017 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jenweber/ffad1b4539878fe53922d4ea3d3ee7ec to your computer and use it in GitHub Desktop.
Save jenweber/ffad1b4539878fe53922d4ea3d3ee7ec to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
animateBool: true,
actions: {
applyAnimation() {
this.toggleProperty('animateBool')
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Route.extend({
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
.something-fixed {
min-height: 80px;
background-color: lightblue;
top:0;
left:0;
}
.liquid-fixed {
position: fixed;
top: 0;
left: 0;
min-height: 40px;
min-width:80px;
}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
<button {{action 'applyAnimation'}}>Apply animation</button>
{{#liquid-if animateBool class="liquid-fixed"}}
<div class="something-fixed">
fixed
</div>
{{/liquid-if}}
{{something-animated}}
index
{
"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",
"liquid-fire": "0.27.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment