Skip to content

Instantly share code, notes, and snippets.

@lifeart
Created March 10, 2016 21:52
Show Gist options
  • Save lifeart/c2e5eff0aa7f21ce98d1 to your computer and use it in GitHub Desktop.
Save lifeart/c2e5eff0aa7f21ce98d1 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
{{name}}<br>
{{#each childs as |event|}}
{{render "recursive-comments" event}}
{{/each}}
{{outlet}}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{sm-journal}}
<br>
<br>
import Ember from 'ember';
export default Ember.Component.extend({
currentUser: -1,
events: [
{
id: 1,
name: "test1",
childs: [
{
id: 3,
name: "test3",
childs: [],
parentId: 1
}
],
parentId: null
},
{
id: 2,
name: "test1",
childs: [],
parentId: null
}
]
});
{{yield}}
{{#each this.events as |event|}}
{{render "recursive-comments" event}}
{{/each}}
{
"version": "0.6.3",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.4.1",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.0/ember-data.js",
"ember-template-compiler": "2.4.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment