PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/js/routers/MainRouter.js

http://github.com/radekstepan/fundamental.js
JavaScript | 19 lines | 9 code | 6 blank | 4 comment | 0 complexity | 586de6f3285c81496cccec739c7def3d MD5 | raw file
  1. // Main App Router
  2. // ----------
  3. App.Routers.Main = Backbone.Router.extend({
  4. initialize: function(options) {
  5. // Initialize new **Todos Collection** and fetch them from db.
  6. App.Models.Todos = new TodoList;
  7. App.Models.Todos.fetch();
  8. // Instantiate the main **Views**.
  9. new App.Views.CreateTodoView;
  10. new App.Views.TodoStatsView;
  11. new App.Views.TodoListView;
  12. }
  13. });