这是适配器/应用程序文件夹。
当我开始遇到一系列错误时,我正在尝试安装和配置pouchdb。
import { Adapter } from 'ember-pouch';
import PouchDB from 'pouchdb';
//import config from 'intern-project/config/environment';
//import Ember from 'ember';
//const { assert, isEmpty } = Ember;
PouchDB.debug.enable('*');
var remote = new PouchDB('http://localhost:5984/offline');
var db = new PouchDB('Patient');
db.sync(remote, {
live: true, // do a live, ongoing sync
retry: true // retry if the conection is lost
});
export default Adapter.extend({
db: db
});
这是错误......
Uncaught Error: Failed to create an instance of 'adapter:application'. Most likely an improperly defined class or an invalid module export.
at instantiate (vendor.js:12083)
at lookup (vendor.js:11941)
at Container.lookup (vendor.js:11860)
at Class.lookup (vendor.js:42326)
at ContainerInstanceCache.instanceFor (vendor.js:103232)
at ContainerInstanceCache._findInstance (vendor.js:103221)
at ContainerInstanceCache.get (vendor.js:103209)
at Class.retrieveManagedInstance (vendor.js:102978)
at Class.lookupAdapter (vendor.js:102984)
at Class.adapterFor (vendor.js:102924)
是否有一个明确说明如何实现pouchdb以及ember js的源?