|
|
|
|
|
by chrisbroadfoot
5419 days ago
|
|
It says it's for JavaScript, but I don't even know what language the code example is in. What is this?! # Create our application and namespace.
class Alfred extends Batman.App
@global yes
@root 'todos#index'
# Define the principle Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage.
class Alfred.Todo extends Batman.Model
@global yes # global exposes this class on the global object, so you can access `Todo` directly.
@persist Batman.LocalStorage
@encode 'body', 'isDone'
body: ''
isDone: false
|
|