meteor easy search
1.0.0
Easy Search เป็นโซลูชันที่ง่ายและยืดหยุ่นในการเพิ่มฟังก์ชันการค้นหาให้กับแอป Meteor ของคุณ ใช้ Blaze Components + Javascript API เพื่อเริ่มต้น
import { Index , MinimongoEngine } from 'meteor/easy:search'
// On Client and Server
const Players = new Mongo . Collection ( 'players' )
const PlayersIndex = new Index ( {
collection : Players ,
fields : [ 'name' ] ,
engine : new MinimongoEngine ( ) ,
} )
// On Client
Template . searchBox . helpers ( {
playersIndex : ( ) => PlayersIndex ,
} ) ;
< template name =" searchBox " >
{{ > EasySearch.Input index=playersIndex }}
< ul >
{{#EasySearch.Each index=playersIndex }}
< li > Name of the player: {{name}} </ li >
{{/EasySearch.Each}}
</ ul >
</ template >
ดูตัวอย่างลีดเดอร์บอร์ดที่ค้นหาได้หรือดูเอกสารประกอบปัจจุบัน (เอกสาร v1) สำหรับข้อมูลเพิ่มเติม
cd /path/to/project
meteor add easy:search