Closed fortuneNext closed 6 years ago
I am having this same issue. How did you resolve this? I can't seem to find the documentation for it.
My working code looks like this:
<ion-auto-complete [dataProvider]="aFunc.bind(this)"></ion-auto-complete>
aFunc(filter: string): Array<string> { return ["1","2"]; }
@fortuneNext it's work for me. Thank you!!!
Yes thanks a lot, also working for me!! Saved my day!
Hi again,
the documentation says that it is possible to pass a simple function that returns an array as dataProvider but it is not documented how exactly the syntax for that is.
Im getting the error "TypeError: this.dataProvider.getResults is not a function" for the line
<ion-auto-complete [dataProvider]="test"></ion-auto-complete>
and error "_co.test is not a function" for the line
<ion-auto-complete [dataProvider]="test()"></ion-auto-complete>
where test is
test(): Array<string> { return ["1", "2"]; }
Am I using it wrong?
Thanks!