Skip to content

Instantly share code, notes, and snippets.

/*global todomvc, angular */
'use strict';
/**
* The main controller for the app. The controller:
* - retrieves and persists the model via the todoStorage service
* - exposes the model to the template and provides event handlers
*/
todomvc.controller('TodoCtrl', function TodoCtrl($scope, $location, $filter, todoStorage) {
var todos = $scope.todos = todoStorage.get();