Created
February 27, 2012 21:52
-
-
Save srdjan/1927346 to your computer and use it in GitHub Desktop.
batmanjs Todo app
This file contains hidden or 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
| class App extends Batman.App | |
| @global(yes) | |
| @root('todos#index') | |
| class App.Todo extends Batman.Model | |
| @global(yes) | |
| @persist(Batman.LocalStorage) | |
| @encode('body', 'isDone') | |
| body: '' | |
| isDone: false | |
| class App.TodosController extends Batman.Controller | |
| newTodo: null | |
| index: -> | |
| @set('newTodo', new Todo) | |
| @render(false) | |
| create: => | |
| @newTodo.save => | |
| @set('newTodo', new Todo) | |
| App.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment