Created
November 3, 2014 02:45
-
-
Save skaasten/d7831d8052de24ea3d57 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/qeboneyoka
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> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.7.0/ember.js"></script> | |
<script src="http://jashkenas.github.io/coffee-script/extras/coffee-script.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="http://builds.emberjs.com/beta/ember-data.js"></script> | |
</head> | |
<body> | |
<script type="text/x-handlebars" data-template-name="players"> | |
<h2>Players</h2> | |
<ul> | |
{{#each}} | |
<li>{{name}}</li> | |
{{/each}} | |
</ul> | |
</script> | |
<script id="jsbin-javascript"> | |
var App; | |
App = Ember.Application.create(); | |
App.Router.map(function() { | |
return this.resource('players'); | |
}); | |
App.ApplicationAdapter = DS.FixtureAdapter.extend(); | |
App.PlayersRoute = Ember.Route.extend({ | |
model: function() { | |
return this.store.find('player'); | |
} | |
}); | |
App.Player = DS.Model.extend({ | |
name: DS.attr() | |
}); | |
App.Player.FIXTURES = [ | |
{ | |
id: 1, | |
name: 'gio' | |
}, { | |
id: 2, | |
name: 'tj' | |
} | |
]; | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script> | |
<script src="//builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"><\/script> | |
<script src="//builds.emberjs.com/tags/v1.7.0/ember.js"><\/script> | |
<script src="//jashkenas.github.io/coffee-script/extras/coffee-script.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="http://builds.emberjs.com/beta/ember-data.js"><\/script> | |
</head> | |
<body> | |
<script type="text/x-handlebars" data-template-name="players"> | |
<h2>Players</h2> | |
<ul> | |
{{#each}} | |
<li>{{name}}</li> | |
{{/each}} | |
</ul> | |
<\/script> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">App = Ember.Application.create() | |
App.Router.map -> | |
this.resource 'players' | |
App.ApplicationAdapter = DS.FixtureAdapter.extend() | |
App.PlayersRoute = Ember.Route.extend | |
model: -> | |
@store.find('player') | |
App.Player = DS.Model.extend | |
name: DS.attr() | |
App.Player.FIXTURES = [ | |
id: 1, | |
name: 'gio' | |
, | |
id: 2, | |
name: 'tj' | |
] | |
</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
var App; | |
App = Ember.Application.create(); | |
App.Router.map(function() { | |
return this.resource('players'); | |
}); | |
App.ApplicationAdapter = DS.FixtureAdapter.extend(); | |
App.PlayersRoute = Ember.Route.extend({ | |
model: function() { | |
return this.store.find('player'); | |
} | |
}); | |
App.Player = DS.Model.extend({ | |
name: DS.attr() | |
}); | |
App.Player.FIXTURES = [ | |
{ | |
id: 1, | |
name: 'gio' | |
}, { | |
id: 2, | |
name: 'tj' | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment