我正在运行在这里找到的教程:
https://www.angular-meteor.com/tutorials/socially/angular2/search-sort-pagination-and-reactive-vars
我正处于实现分页的地步,但它抛出了一个错误。控制台在第 7 行的party-list.component.ts 中抛出错误。第 7 行的代码是:
import { PaginationService, PaginationControlsCmp } from 'ng2-pagination';
抛出的完整错误是:
ng2-pagination.js:26Uncaught TypeError: core_1.NgModule is not a function
我在想也许 ng2-pagination 与我在流星内部运行的 angular 版本不兼容,但不知道如何找出答案。
我的 package.js 文件:
{
"name": "angular2-meteor-base",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --driver-package practicalmeteor:mocha",
"test:ci": "meteor test --once --driver-package dispatch:mocha-phantomjs"
},
"devDependencies": {
"chai": "3.5.0",
"chai-spies": "0.7.1"
},
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-alpha.8",
"angular2-meteor": "0.6.2",
"angular2-meteor-accounts-ui": "^0.6.1",
"angular2-meteor-auto-bootstrap": "0.6.0",
"angular2-meteor-polyfills": "0.1.1",
"angular2-meteor-tests-polyfills": "0.0.2",
"es6-shim": "0.35.1",
"meteor-node-stubs": "0.2.3",
"ng2-pagination": "https://registry.npmjs.org/ng2-pagination/-/ng2-pagination-0.4.1.tgz",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12"
}
}