Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Confused using ion-autocomplete

$
0
0

@regissteigleder wrote:

Hi all.
I'm using the ion-autocomplete, one great component from guylabs. ( thank you guys )
I'm quite confused using it.
Here is my code;

input ion-autocomplete type="text"
readonly="readonly"
lass="ion-autocomplete"
autocomplete="off"
ng-model="field"
item-value-key="id"
item-view-value-key="name"
items-method="getThings(query)"
items-method-value-key="items"
items-clicked-method="itemsClicked(callback)"
items-removed-method="itemsRemoved(callback)"
max-selected-items="1"
cancel-label="goBack"

Everything works fine, but... (always exist one "but" in everything)
After i chose one item in the list:
How I get the id from the model? field.id ?
How I get the name from the model? fiel.name ?
How I bind the model in a crud app that use the id as a column in database ?
Have you a example to help me?
Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>