Created
August 28, 2012 21:51
-
-
Save eastridge/3504663 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
$(function() { | |
var Application = window.Application = new Thorax.ViewController({ | |
template: "{{layout}}" | |
}); | |
Backbone.history.start(); | |
Application.render(); | |
$('body').append(Application.el); | |
var Todos = Thorax.Collections.Todos = Thorax.Collection.extend({}); | |
var Cats = Thorax.Collections.Cats = Thorax.Collection.extend({}); | |
Cats.instance = new Cats([ | |
{ | |
name: "Mittens", | |
age: 3, | |
qualities: { | |
fluffy: false, | |
bitey: true, | |
snarky: false | |
}, | |
todos: new Todos([ | |
{ | |
item: 'Finish Thorax Site', | |
done: false | |
}, | |
{ | |
item: 'Neuter best friend', | |
done: true | |
} | |
]) | |
}, | |
{ | |
name: "George", | |
age: 5, | |
qualities: { | |
fluffy: true, | |
bitey: false, | |
snarky: false | |
}, | |
todos: new Todos([ | |
{ | |
item: 'Catch mice', | |
done: true | |
}, | |
{ | |
item: 'Think of better todo list', | |
done: false | |
} | |
]) | |
}, | |
{ | |
name: "Killer", | |
age: 2, | |
qualities: { | |
fluffy: false, | |
bitey: false, | |
snarky: true | |
}, | |
todos: new Todos([ | |
{ | |
item: 'Finish Thorax Site', | |
done: false | |
}, | |
{ | |
item: 'Neuter best friend', | |
done: true | |
} | |
]) | |
} | |
]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment