The project says to format the code like
ng-click="upVote(post)". Shouldn't it be
I still have an issue when I use $index, though. If I make the fourth posts have more upvotes than the third, when I go to upvote the third post (which is least in the amount of upvotes), the fourth post's upvotes increase. You can see what I'm talking about by upvoting Retrofit water fountain with Gatorade here.
Seems like this page is talking about the same problem. Seems like there's a reason to use post instead of $index.
Edit: Got it. I was over-complicating things. The project says that the function is similar to a past function we created called plusOne, which threw me off a bit. It's simpler than that function.