Adding parameter to ng-click function inside ng-repeat doesn’t seem to work

I have a simple loop with ng-repeat like this: <li ng-repeat=”task in tasks”> <p> {{task.name}} <button ng-click=”removeTask({{task.id}})”>remove</button> </li> There is a function in the controller $scope.removeTask(taskID). As far as I know Angular will first render the view and replace interpolated {{task.id}} with a number, and then, on click event, will evaluate ng-click string. In this … Read more

Angular ng-repeat Error “Duplicates in a repeater are not allowed.”

I am defining a custom filter like so: <div class=”idea item” ng-repeat=”item in items” isoatom> <div class=”section comment clearfix” ng-repeat=”comment in item.comments | range:1:2″> …. </div> </div> As you can see the ng-repeat where the filter is being used is nested within another ng-repeat The filter is defined like this: myapp.filter(‘range’, function() { return function(input, … Read more