JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller="MainController" ng-app>
<div ng-repeat="record in records">
<input ng-model="record.inner[0].text"> <span>{{record.outer}}</span>
<div ng-repeat="nested in record.inner">{{nested.id}} - {{nested.text}}</div>
<hr />
</div>
</div>
<br/>
JavaScript
function MainController($scope) {
$scope.records = [{
outer: "Hello",
inner: [{
id: 1,
text: "Angular"
}, {
id: 2,
text: "jQuery"
}]
}, {
outer: "World",
inner: [{
id: 1,
text: "Node.js"
}, {
id: 2,
text: "Underscore.js"
}]
}];
$scope.getText = function (record) {
var index = 0;
for (nested in record.inner) {
if (nested.id === 1) {
return "record.inner[" + index + "].text";
}
index++;
}
};
}