I am trying to use uib-typeahead
to select one or more objects (via an ng-repeat
), but facing an issue where the model does not persist when adding another object.
This is reproduced on Plnkr here (based on ui-bootstrap's demo). (Reproduce the error by selecting a state, then clicking "Select another". The previously selected state disappears!)
What is causing the model to not persist? How can this be fixed? Is it an issue with uib-typeahead
? Or the ng-repeat
scope?
NB: I am also using a custom ngModel formatter, but that doesn't appear to be causing any issue; the issue remains when removing the format-state
directive.
I have tried setting ng-model-options
, to no avail.
Help appreciated!