I am trying to use Angular-UI typeahead along with some data from my firebase.
The data looks something like this:
Data:{
"-JL8IPEAs0vLSt4DJ4V9": { "name": "Something" },
"-JL8IbggYn3O8jkWoPmv": { "name": "Something Else" }
}
My HTML looks like this:
<input type="text" ng-model="answer.help" typeahead="label for (key , value) in object | limitTo:8">
Basically, my problem is that I cannot figure out how to select the right part in typeahead with my current data structure.
These resources were useful:
https://docs.angularjs.org/api/ng/directive/select
http://angular-ui.imtqy.com/bootstrap/#/typeahead
But I could not figure out how to make it work. I suppose this is relatively simple, but I could not find anywhere that could help me figure this out. I tried many different combinations, but since the typeahead part gives a lot of useful feedback, when I do it wrong, I find myself stuck.
. .