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?
ng-click="fadeOut($index)"without curly brackets