Skip to content

Instantly share code, notes, and snippets.

@ericop
Last active August 29, 2015 14:25
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 ericop/814f16599a6853d05eb7 to your computer and use it in GitHub Desktop.
Save ericop/814f16599a6853d05eb7 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Eric OPs Ember Twiddle'
});
import Ember from 'ember';
var Router = Ember.Router.extend({
location: 'none'
});
Router.map(function() {
});
export default Router;
export default Ember.Route.extend({
model: function() {
return [this.get('one'),
this.get('blue'),
this.get('notIt'),
this.get('nully'),
this.get('notIt2')];
},
one: 1,
blue: 'blue',
truth: true,
notIt: Ember.computed.not('truth'),
nully: null,
notIt2: Ember.computed.not('undef'),
undef: undefined,
});
body {
margin: 12px 16px;
background: #faf4f1;
}
h1 {
font-family: 'Pacifico', cursive;
color: white;
text-shadow: 1px 1px 1px #000;
background: url('https://static.jsbin.com/custom/emberjs/navigation_background.png') repeat-x;
border-bottom: 1px solid #AA412F;
box-shadow: 1px 1px 1px #000;
background-size:cover;
border-radius: 4px;
}
li {
background-image: linear-gradient(-90deg, #f4d2c1, #e7624b);
border: 1px solid #faf4f1;
border-radius: 4px;
padding: 5px;
}
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<h1>Welcome to {{appName}}</h1><br>
{{outlet}}
<br>
<b class="foo">Index Route</b>
<ul>
{{#each model as |item|}}
<li>{{item}}</li>
{{/each}}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment