Q:

Serial Number using nested NG-Repeat

I want to add serial number in each question
ng-repeat = "Table in Paper"
   Display table
ng-repeat = "question in question" 
   (1) Display question
   (2) Display question

I can use $index in Question.  But for each Table, it is started from 1. 
E.g.

Table 1
Question 1
Question 2
Table 2
Question 1
Question 2

But I want

Table 1
Question 1
Question 2
Table 2
Question 3
Question 4

I use $parent & $index.  But not working. 
<div ng-repeat="section in Table">
 <div ng-repeat="question in section.question">
         <span >{{(Section[$parent.$index-1].question.length + $index + 1 )+
                                    '. '  +
                                    question
                                    .Description}}</span>
     
  </div>

A:

This may not the perfect solution what I want, But It can be a temporary solution,
Create watch or function in controller to traverse all question 
                var index=1;
                Section.forEach(function (section) {
                        section.question.forEach(function (question) {
                            question. Number= index;
                            index++;
                        })
                })

Then Print this number in ng-repeat 
<div ng-repeat="section in Table">
  <div ng-repeat="question in section.question">
     <span >{{question. Number +'. '  +question. Description}}</span>
   </div>
</div>   

