I am having a big trouble training to use ember.js. When I add the following code in http://emberjs.com/guides/getting-started/adding-a-route-and-template/ all my contents disappeared.
Firebug detect: "ReferenceError: Todos is not defined", but was defined in todo.js e loaded properly in index.html:
todo.js
Todos.Todo = DS.Model.extend({
title: DS.attr('string'),
isCompleted: DS.attr('boolean')
});
Todos.Todo.FIXTURES = [
{
id: 1,
title: 'Learn Ember.js',
isCompleted: true
},
{
id: 2,
title: '...',
isCompleted: false
},
{
id: 3,
title: 'Profit!',
isCompleted: false
}
];
This is a link to all my files: https://gist.github.com/anonymous/6416743 (not included the base js files).
I do everything in the tutorial until http://emberjs.com/guides/getting-started/displaying-model-data/
Thanks for any help.