Skip to content

Instantly share code, notes, and snippets.

@code0100fun
Last active May 23, 2016 22:54
Show Gist options
  • Select an option

  • Save code0100fun/49797ce2f67a867fef271542b9dd26e0 to your computer and use it in GitHub Desktop.

Select an option

Save code0100fun/49797ce2f67a867fef271542b9dd26e0 to your computer and use it in GitHub Desktop.
Templates
import Ember from 'ember';
export default Ember.Controller.extend({
firstName: 'Tom',
lastName: 'Dale',
people: [
{ name: 'Leah Silber', teamName: 'learning' },
{ name: 'Matthew Beale' }
],
team: {
'Ricardo Mendes': 'learning',
'Katie Gengler': 'cli',
'Stanley Stuart': 'data'
}
});
<p>
Hello, <strong>Yehuda Katz</strong>!
</p>
<p>
Hello, <strong>{{firstName}} {{lastName}}</strong>!
</p>
{{#each people as |person|}}
<p>
Hello, <strong>{{person.name}}</strong>!
</p>
{{/each}}
{{#each-in team as |name teamName|}}
<p>
Hello, <strong>{{name}}</strong>!
Thanks for your work on the {{teamName}} team.
</p>
{{else}}
Sorry, no subteam yet.
{{/each-in}}
{
"version": "0.8.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.5.1",
"ember-data": "2.5.2",
"ember-template-compiler": "2.5.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment