kadoshms / ionic2-autocomplete

Ionic 2 autocomplete component
MIT License
149 stars 108 forks source link

Can't provide array as data source #144

Closed lakehouseru closed 6 years ago

lakehouseru commented 6 years ago

There's a statement in a docs

  1. A simple function that returns an Array of items

But there's no example of code explaining how to do it. Can anyone give an example code?

As I can see [dataProvider]="only Provider Class here" can receive only Service inherited from AutoCompleteService.

kadoshms commented 6 years ago

You can simply create a function that returns an array, and pass it as a dataProvider