Javascript 角度误差?

Javascript 角度误差?,javascript,angularjs,Javascript,Angularjs,我正在尝试使用基于ng选项的下拉列表。我的代码当前如下所示: <select ng-options="choice.id as choice.singular in model.quanityChoices" ng-model="med.id" <option value=""></option> </select> [ {id: 1, singular: 'word'}, {id: 2, singular: 'wor

我正在尝试使用基于ng选项的下拉列表。我的代码当前如下所示:

<select
     ng-options="choice.id as choice.singular in model.quanityChoices"
     ng-model="med.id"
     <option value=""></option>
</select>
[
 {id: 1, singular: 'word'},
 {id: 2, singular: 'word2'}
]
目前,我的目标是有一个下拉列表,用户将看到选项“word”和“words”,但应用的值是ID

当前我的代码有以下错误:

Error: [ngOptions:iexp] Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got 'choice.id as choice.singular in model.quantityFormChoices'. Element: <select...

错误:[ngOptions:iexp]预期表达式的形式为“\u select\u(as\u label\u)?对于(_key_u,)?_value_u在_collection_u'中,但获得了'choice.id作为模型中的choice.singular.quantityFormChoices'。元素:您没有正确构造它,请查看错误,因为它为您提供了有关如何执行此操作的详细信息:

<select
     ng-options="choice.id as choice.singular for choice in model.quanityChoices"
     ng-model="med.id"
     <option value=""></option>
</select>

哦,哇,是的,这很明显,我一直在将它与代码中的另一个ng选项进行比较,但我没有注意到它缺少了“for choice in”部分。很抱歉,几乎可以肯定我点击了它!,但最近的历史表明,我对细节的关注程度很低()