Your First APP 10/11

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-angularjs/lessons/your-first-app/exercises/your-first-app-ng-click-ii?action=resume

<In what way does your code behave incorrectly? Include ALL error messages.>
On the

element, make sure to use ng-click to call the minusOne() function.

Everything is set, but I still get the same error.

MainController
 $scope.minusOne = function(index) {
    $scope.products[index].dislikes -= 1;
  };
  $scope.plusOne = function(index) { 
  	$scope.products[index].likes += 1; 
	};
index.html
 <p class="dislikes" ng-click="minusOne($index)">
            -{{product.dislikes}}
          </p>

Here,

It should be +=1.

So that it counts upward. Your minus ( - ) sign in view will help display it as a dislike to your user.

1 Like

Thank you!
i tried everything, but did not tink of that!!
<3

You’re welcome, @jfsene .

Have fun coding! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.