Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Serabe
Created September 3, 2017 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Serabe/f2043c0c2d3015299ebdcf9a4e57cc34 to your computer and use it in GitHub Desktop.
Save Serabe/f2043c0c2d3015299ebdcf9a4e57cc34 to your computer and use it in GitHub Desktop.
Partial working in 2.14
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
names: ['Sergio', 'Alberto', 'Fran']
});
{{#if name}}
We have a name!
{{ else }}
We have no name!
{{/if}}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<div class="with-example">
{{#with "Sergio" as |name|}}
{{partial "bad"}}
{{/with}}
</div>
<ul class="each-example">
{{#each names as |name|}}
<li>{{partial "bad"}}</li>
{{/each}}
</ul>
<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.14.0",
"ember-template-compiler": "2.14.0"
},
"addons": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment