I am getting array of key in angular js controller. And I am able to get particular value in controller. But I am not able to get in view(HTML).
Controller:
var statusLength= res.fsus.length;
for(var i=0; i<statusLength; i++)
{
$scope.opts=res.fsus[i].statusMessageType.MasterConsignment.ReportedStatus.ReasonCode
}
In this loop I am able to get particular value. I want to display these value in View(HTML) part. I am new in angular js. I am not sure I am doing right or not.
Value is In Loop
var
car
ban
But when I tried to get in UI(HTML) then It will displaying only v a r. Not displaying var car ban. It is displaying only v a r
HTML
<li ng-repeat=" opt in opts">
<span class="step">{{opt}}</span>
</li>
JSON
fsus[{
statusMessageType:{
MasterConsignment:{
ReportedStatus:{
ReasonCode:"var"
}
}
},
statusMessageType:{
MasterConsignment:{
ReportedStatus:{
ReasonCode:"car"
}
}
},
statusMessageType:{
MasterConsignment:{
ReportedStatus:{
ReasonCode:"ban"
}
}
},
}]
please share your idea. thanks