Created
June 10, 2014 22:09
-
-
Save danott/842fec3b53a33a2bc88a to your computer and use it in GitHub Desktop.
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
# required on jsbin | |
Batman.config.usePushState = false | |
simpleStore = new Batman.Set() | |
simpleStore.add new Batman.Object({name: "Red"}) | |
simpleStore.add new Batman.Object({name: "Green"}) | |
simpleStore.add new Batman.Object({name: "Blue"}) | |
class App extends Batman.App | |
@root "colors#index" | |
class App.ColorsController extends Batman.Controller | |
routingKey: 'colors' | |
index: -> | |
@set('colors', simpleStore) | |
App.run() |
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="//cdnjs.cloudflare.com/ajax/libs/batman.js/0.16.0/batman.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div data-yield="main"></div> | |
<div data-defineview="colors/index"> | |
<div data-foreach-color="colors"> | |
<a data-bind="color.name"></a> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment