I have a page where An array has an array inside it and is displyed using ng-repeat 2 times.
<div ng-repeat="chapter in chapters">
<div ng-repeat="page in chapter.pages">
<p>Title: {{page.title}}</p>
</div>
</div>
the array is:
$scope.chapters= [
{
pages: [
{title: 'Title3'},
{title: 'Title4'},
{title: 'Title5'}
]
},
{
pages: [
{title: 'Title1'},
{title: 'Title2'}
]
}
];
I need to access $index of chapter and pages inside 'p' element i.e. i want to access the chapter no and page no there.
how can i achieve that?