Commit 8d168ae9 authored by dsumac's avatar dsumac

Use Marionette Controller

parent c6f93e06
/*global TodoMVC */ /*global TodoMVC */
'use strict'; 'use strict';
TodoMVC.module('TodoList', function (TodoList, App, Backbone, Marionette, $, _) { TodoMVC.module('TodoList', function (TodoList, App, Backbone, Marionette, $) {
// TodoList Router // TodoList Router
// --------------- // ---------------
// //
...@@ -17,11 +17,10 @@ TodoMVC.module('TodoList', function (TodoList, App, Backbone, Marionette, $, _) ...@@ -17,11 +17,10 @@ TodoMVC.module('TodoList', function (TodoList, App, Backbone, Marionette, $, _)
// //
// Control the workflow and logic that exists at the application // Control the workflow and logic that exists at the application
// level, above the implementation detail of views and models // level, above the implementation detail of views and models
TodoList.Controller = function () { TodoList.Controller = Marionette.Controller.extend({
this.todoList = new App.Todos.TodoList(); initialize: function () {
}; this.todoList = new App.Todos.TodoList();
},
_.extend(TodoList.Controller.prototype, {
// Start the app by showing the appropriate views // Start the app by showing the appropriate views
// and fetching the list of todo items, if there are any // and fetching the list of todo items, if there are any
start: function () { start: function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment