Permalink
Browse files

Show Todo details

1 parent 46dd140 commit 2484107294163a25621fba3785601adb32229ae9 @amejiarosario committed Oct 3, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 views/index.ejs
View
@@ -20,7 +20,7 @@
<ul>
<li ng-repeat="todo in todos | filter: search">
<input type="checkbox" ng-model="todo.completed">
- <a href="#/{{$index}}">{{todo.name}}</a>
+ <a href="#/{{todo._id}}">{{todo.name}}</a>
</li>
</ul>
New task <input type="text" ng-model="newTodo"><button ng-click="save()">Create</button>
@@ -64,7 +64,7 @@
}])
.controller('TodoDetailCtrl', ['$scope', '$routeParams', 'Todos', function ($scope, $routeParams, Todos) {
- $scope.todo = Todos[$routeParams.id];
+ $scope.todo = Todos.get({id: $routeParams.id });
}])
//---------------

0 comments on commit 2484107

Please sign in to comment.