can I use linq2fire in auto-complete search ?
opened this issue · comments
Deleted user commented
can I use linq2fire in auto-complete search ?
HTML5
<input type="text">
TS
const self = this;
self.results = self.afs.collection(`AddListData`, ref => ref
.orderBy('title')
.startAt(self.searchValue.toLowerCase())
.endAt(self.searchValue.toLowerCase() + '\uf8ff')
.limit(10))
.valueChanges();
linq2js commented
yes, you can
just refactor your code to:
const results = linq2fire(self.afs.collection(`AddListData`)).where({ 'title^=': searchValue }).limit(10).orderBy({ title: 'asc' })