使用AngularJS如何获取ng-repeat项目的索引(计数器)?

6 浏览
0 Comments

使用AngularJS如何获取ng-repeat项目的索引(计数器)?

我正在使用AngularJS和它的ng-repeat指令来显示一系列问题。我需要对每个问题进行编号,从1开始。如何使用ng-repeat来显示和递增这样一个计数器?以下是我目前的代码:

  • {{ question.questionText }}
    • {{answer.selector}}. {{ answer.answerText }}

0