How to pass an Angular's value to a function
angularjs
Solution
You can use fadeOut($index) as follows:
<img ng-src={{element.image}}
class="portofolio-image"
id="portofolio-image{{$index}}"
ng-click="fadeOut($index)">
Problem
I want to call a function `fadeOut()` passing to it an index number generated by ng-repeat. I tried this ``` <img ng-src={{element.image}} class="portofolio-image" id="portofolio-image{{$index}}" ng-click="fadeOut({{$index}})"> ``` but there is a parsing error, and this ``` <img ng-src={{element.image}} class="portofolio-image" id="portofolio-image{{$index}}" ng-click="fadeOut('{{$index}}')"> ``` which passes the "{{$index}}" string. Any idea how can I solve this?