Skip to content

Instantly share code, notes, and snippets.

@3gwebtrain
Last active August 3, 2017 10:45
Show Gist options
  • Save 3gwebtrain/28d479172340f7ee1acf4cbcda67b64c to your computer and use it in GitHub Desktop.
Save 3gwebtrain/28d479172340f7ee1acf4cbcda67b64c to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Route.extend({
model(){
return [
{title:"Mango",info:"mango is yellow"},
{title:"Lotus",info:"Lotus is flower and white"},
{title:"Lilly",info:"Lilly as well flower but rose color"}
];
}
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
ul,li{
padding:0;
margin:0;
}
li{
background:lightgray
}
.addBorder{
border:1px solid green;
}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
<div class="wrap">
<h5>{{item}}</h5>
<p>{{info}}</p>
</div>
<h2 class="addBorder">On click list will be highlighed like me</h2>
<ul>
{{#each model as |item|}}
{{my-child item=item.title info=item.info tagName="li"}}
{{/each}}
</ul>
<h1>I am from Index page </h1>
{{my-parent model=model}}
{
"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"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment