我在这里做错了什么,Angular(1.1.5)没有在这个分组选择下拉列表中正确选择正确的值?
HTML:<select ng-model="options.metricId" ng-options="answer.id as answer.name group by answer.question for answer in options.answers track by answer.id"></select>
options.metricId
由控制器正确设置。
该options.answers
对象如下所示:
{id: 8, name: "Leads Others", question: "Assessment"}
所有选项都出现了,但它没有answer.id == options.metricId
像我期望的那样选择值。