/js/routers/MainRouter.js
JavaScript | 19 lines | 9 code | 6 blank | 4 comment | 0 complexity | 586de6f3285c81496cccec739c7def3d MD5 | raw file
- // Main App Router
- // ----------
- App.Routers.Main = Backbone.Router.extend({
- initialize: function(options) {
- // Initialize new **Todos Collection** and fetch them from db.
- App.Models.Todos = new TodoList;
- App.Models.Todos.fetch();
- // Instantiate the main **Views**.
- new App.Views.CreateTodoView;
-
- new App.Views.TodoStatsView;
- new App.Views.TodoListView;
- }
- });