function TaskListController($scope) {
    var tasks = $scope.tasks = [];

    $scope.addTask = function(newTask) {
        var title, duration;

        if (!newTask) { return; }

        title = newTask;
        duration = newTask.duration || 0;
        
        tasks.push({
            title: title,
            duration: duration,
            class: "",
            done: false
        });

        $scope.newTask = null;
    };

    $scope.removeTask = function(task) {
        tasks.splice(tasks.indexOf(task), 1);
    };

    $scope.toggleTaskStatus = function(task) {
        task.done = !task.done;
        task.class =  (task.done) ? "task-done" : "";
    };

}

@@ -1,16 +1,26 @@
-function
+%22use strict%22;%0A%0Avar
  TaskLis
@@ -30,16 +30,28 @@
 ntroller
+ = function 
 ($scope)
@@ -687,8 +687,126 @@
   %7D;%0A%0A%7D%0A
+%0ATaskListController.prototype.matchPattern = function (str) %7B%0A    return str.match(/(%5Cs*%5B0-9%5D+h)?(%5Cs*%5B0-9%5D+m)?$/);%0A%7D;%0A

Add TaskListController matchPattern()