driftyco/ionic-site — pull request #104 by DallanQ (2014-01-21 23:02:55+00:00)
Title: create a new task object before showing the taskModal

Without this I get an `Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed` if I add more than one task to the Creating Tasks example, because each time $scope.createTask is called, the same $scope.task object (with an updated title) is pushed onto the array. Alternatively, you could set`ng-submit="createTask({title: task.title})"` instead of `createTask(task)`, but setting `$scope.task = {}` before showing the dialog also clears the task title so you see the placeholder text, which is nice.