Inside view I have following snippet where I'm iterating trough collection of data
<div class="tab-content" ng-controller="homeController as vm">
<div class="tab-pane fade in active" ng-repeat="item in vm.data">
{{item.Total}}
<script>
var arrValues = [1, 5, 6, 7];
// how can I access from here to item.Total
</script>
</div>
</div>
I tried using following code to access item.Total but I'm getting
Uncaught ReferenceError: item is not defined
if (arrValues.indexOf(item.Total) > -1) {
console.log('A');
} else {
console.log('B');
}
p.s. data binding works fine {{item.Total}} render value as expected.