【发布时间】:2018-04-15 18:26:33
【问题描述】:
我目前正在使用本指南来轻松搜索天气。
http://matteodem.github.io/meteor-easy-search/
它会产生如下错误:
TypeError: MinimongoEngine is not a constructor
这就是我实现搜索的方式:
已安装的软件包:
matteodem:easy-search
easy:search
easysearch:components
easysearch:core
客户端/searchBox.html
<template name="searchBox">
{{> EasySearch.Input index=playersIndex }}
<ul>
{{#EasySearch.Each index=playersIndex }}
<li>Name of the player: {{name}}</li>
{{/EasySearch.Each}}
</ul>
</template>
客户端/searchBox.js
// On Client
Template.searchBox.helpers({
playersIndex: () => PlayersIndex,
})
lib/collection.js
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()
})
关于如何解决它的一些想法,我是流星的新手,所以任何帮助将不胜感激。如果我做错了什么,请帮忙。
【问题讨论】:
标签: meteor meteor-blaze meteor-easy-search