Reputation: 115
I have a question.
In this code
{{gridOptions4[0].no}}
output is 1
.
but in this code:
var i=0;
{{gridOptions4[i].no}}
output is no data.
Why is this value coming out?
Upvotes: 1
Views: 98
Reputation: 2534
To get the value in your html file use $scope.i=0;
, if you use var i = 0;
, it means its local variable, in view it will not able to use the value of i
. The following change will work for you:
$scope.i=0;
{{gridOptions4[i].no}}
Upvotes: 2