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

535 Views Asked by At

I want to use angular-typeahead with setting ng-model-options="{ getterSetter: true }. As far as I understand, in this case typeahead should use value of ng-model as getter/setter.

But in fact typeahead overrides getter/setter as value of model. Looks like typeahead does not respect value of ng-models-options.

Here my code

     <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()">

Is there any way to make typeahead respect ng-model-options and use getterSetter. Is it feature available?

As far as I understand for some reasons typeahead overrides model setter with selected value. Here the plankr: http://plnkr.co/edit/a3Ld9eVmysrt8RsyzbhX?p=preview

After you select one or two, you will see that `value' has been changed: in is not a function any more.

1

There are 1 best solutions below

0
On BEST ANSWER

Right now angular-ui/bootstrap typeahead does not support ng-model-options, but there is a patch for it with 0.13.1 target release. https://github.com/angular-ui/bootstrap/pull/3865