Created
July 21, 2015 03:12
-
-
Save anonymous/c15874232d3c0bf2cca1 to your computer and use it in GitHub Desktop.
Ember Starter Kit // source https://emberjs.jsbin.com/potoxucipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.13.4/ember-template-compiler.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.13.4/ember.debug.js"></script> | |
<style id="jsbin-css"> | |
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} | |
</style> | |
</head> | |
<body> | |
<p>hello</p> | |
<script type="text/x-handlebars"> | |
<ul> | |
{{#each model as |song|}} | |
<li>{{song.title}} by {{song.band}} ({{song.rating}})</li> | |
{/each} | |
</ul> | |
</script> | |
<script id="jsbin-javascript"> | |
App = Ember.Application.create(); | |
var blackDog = { | |
title: 'Black Dog', | |
band: 'Led Zeppelin', | |
rating: 3 | |
}; | |
var yellowLedbetter = { | |
title: 'Yellow Ledbetter', | |
band: 'Pearl Jam', | |
rating: 4 | |
}; | |
var pretender = { | |
title: 'The Pretender', | |
band: 'Foo Fighters', | |
rating: 2 | |
}; | |
var songs = [blackDog, yellowLedbetter, pretender]; | |
App.ApplicationRoute = Ember.Route.extend({ | |
model: function(){ | |
return songs; | |
} | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"><\/script> | |
<script src="http://builds.emberjs.com/tags/v1.13.4/ember-template-compiler.js"><\/script> | |
<script src="http://builds.emberjs.com/tags/v1.13.4/ember.debug.js"><\/script> | |
</head> | |
<body> | |
<p>hello</p> | |
<script type="text/x-handlebars"> | |
<ul> | |
{{#each model as |song|}} | |
<li>{{song.title}} by {{song.band}} ({{song.rating}})</li> | |
{/each} | |
</ul> | |
<\/script> | |
</body> | |
</html> | |
</script> | |
<script id="jsbin-source-css" type="text/css">/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">App = Ember.Application.create(); | |
var blackDog = { | |
title: 'Black Dog', | |
band: 'Led Zeppelin', | |
rating: 3 | |
}; | |
var yellowLedbetter = { | |
title: 'Yellow Ledbetter', | |
band: 'Pearl Jam', | |
rating: 4 | |
}; | |
var pretender = { | |
title: 'The Pretender', | |
band: 'Foo Fighters', | |
rating: 2 | |
}; | |
var songs = [blackDog, yellowLedbetter, pretender]; | |
App.ApplicationRoute = Ember.Route.extend({ | |
model: function(){ | |
return songs; | |
} | |
});</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App = Ember.Application.create(); | |
var blackDog = { | |
title: 'Black Dog', | |
band: 'Led Zeppelin', | |
rating: 3 | |
}; | |
var yellowLedbetter = { | |
title: 'Yellow Ledbetter', | |
band: 'Pearl Jam', | |
rating: 4 | |
}; | |
var pretender = { | |
title: 'The Pretender', | |
band: 'Foo Fighters', | |
rating: 2 | |
}; | |
var songs = [blackDog, yellowLedbetter, pretender]; | |
App.ApplicationRoute = Ember.Route.extend({ | |
model: function(){ | |
return songs; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment