9. Why do we need $index when MainController is only index


#1

Why do we need $ in front of index

<p class="likes" ng-click="plusOne($index)"> + {{ product.likes }} </p>

LINK TO LESSON
https://www.codecademy.com/en/courses/learn-angularjs/lessons/your-first-app/exercises/your-first-app-ng-click-i?action=lesson_resume


#2

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