Ng click2


$scope.products, attach a new property to $scope named minusOne. Set it equal to a function that adds one to a product's dislikes property. Adapt the code from the plusOne() function to do this


Hey there, hope this helps:

It's nearly the same code as when we added the first "like" property. which was:

$scope.plusOne = function(index) {
$scope.products[index].likes += 1;

Now we just plug our minusOne info in with one or two small differences:

$scope.minusOne = function(index) {
$scope.products[index].dislikes -= 1;

The differences being the minusOne added and the .dislikes -=1
I'm no expert but I hope that helps! Cheers Mate