angular-ui/bootstrap typeahead 是否支持 ng-model-options?

Does angular-ui/bootstrap typeahead support ng-model-options?

我想使用 angular-typeahead 设置 ng-model-options="{ getterSetter: true }。据我所知,在这种情况下,typeahead 应该使用 ng-model 的值作为 getter/setter.

但实际上预先输入会覆盖 getter/setter 作为模型的值。看起来 typeahead 不尊重 ng-models-options 的价值。

这是我的代码

     <input type="text" class="form-control" 
            id="elem-{$ $id $}" ng-model="value.value"
            ng-model-options="{ getterSetter: true }"
            typeahead="option for option in value.getOptions()">

有什么方法可以让 typeahead 遵守 ng-model-options 并使用 getterSetter。该功能可用吗?

据我所知,出于某些原因,预先输入会使用 selected 值覆盖模型 setter。这里是 plankr:http://plnkr.co/edit/a3Ld9eVmysrt8RsyzbhX?p=preview

在你 select 一两次之后,你会看到 `value' 已经改变了:in 不再是一个函数。

目前angular-ui/bootstrap typeahead 不支持 ng-model-options,但在 0.13.1 目标版本中有一个补丁。 https://github.com/angular-ui/bootstrap/pull/3865