我尝试将AngularFir2 v4.0.0-rc.2
下载到angular-seed repo https://github.com/mgechev/angular-seed/
以下行是从我认为与错误相关的文件扩展而来的:
karma.conf.js
{ pattern: 'node_modules/firebase/**/*.js', included: false, watched: false },
{ pattern: 'node_modules/angularfire2/bundles/*.umd.js', included: false, watched: false },
project.config.ts
let additionalPackages: ExtendPackages[] = [
{ name: 'firebase', path: 'node_modules/firebase'},
{ name: 'angularfire2', path : 'node_modules/angularfire2/bundles'}
];
this.addPackagesBundles(additionalPackages);
测试config.js
System.config({
baseURL: '/base/',
paths: {
angular2: 'node_modules/angular2',
angularfire2 : 'node_modules/angularfire2',
rxjs: 'node_modules/rxjs',
},
packages: {
'': {
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
}
}
});
的package.json
"angularfire2": "^4.0.0-rc.2",
"firebase": "^4.3.0",
可能SystemJS并没有从Angular Fire中读取任何内容,因为导入{ AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'
时我在vscode中没有出现错误