Я пытаюсь представить разбивку на страницы для своего приложения, но получаю ошибку. Я следую ng2-bootstrapТип 'Тип' не является общим
это, как я объявил поля в моем компоненте:
public bigTotalItems: number = IEmployee.length;
public maxSize: number = 5;
И это, как я использовал их в шаблоне:
<pagination [totalItems]="bigTotalItems" [maxSize]="maxSize" class="pagination-sm"
[boundaryLinks]="true"></pagination>
Heres моего app.module.ts:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HttpModule } from '@angular/http';
import { PaginationModule } from 'ng2-bootstrap';
@NgModule({
imports: [PaginationModule.forRoot(),BrowserModule, FormsModule, HttpModule ],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
Я получаю эту ошибку в файле component-loader.class.d.ts
.
крепления Также package.json поделиться версии зависимостей Я использую:
{
"name": "angular2-quickstart",
"version": "1.0.0",
"description": "QuickStart package.json from the documentation, supplemented with testing support",
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"docker-build": "docker build -t ng2-quickstart .",
"docker": "npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart",
"pree2e": "npm run webdriver:update",
"e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first",
"lint": "tslint ./app/**/*.ts -t verbose",
"lite": "lite-server",
"postinstall": "typings install",
"test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
"test-once": "tsc && karma start karma.conf.js --single-run",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings",
"webdriver:update": "webdriver-manager update"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.5",
"angular2-in-memory-web-api": "0.0.15",
"bootstrap": "^3.3.6",
"core-js": "^2.4.0",
"ng2-bootstrap": "^1.3.3",
"ng2-paginate": "^0.1.0",
"ng2-pagination": "^2.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
"concurrently": "^2.2.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings": "^1.0.4",
"canonical-path": "0.0.2",
"http-server": "^0.9.0",
"tslint": "^3.7.4",
"lodash": "^4.11.1",
"jasmine-core": "~2.4.1",
"karma": "^0.13.22",
"karma-chrome-launcher": "^0.2.3",
"karma-cli": "^0.1.2",
"karma-htmlfile-reporter": "^0.2.2",
"karma-jasmine": "^0.3.8",
"protractor": "^3.3.0",
"rimraf": "^2.5.2"
},
"repository": {}
}
Есть ли что-то, что кто-то может помочь. Заранее спасибо.
Так что я должен просто обновить пакеты, упомянутые как «rc5» в пакете.json, на 'rc6' и оставить другие dependecies как есть? –
Ну, чтобы решить вашу проблему. Да, это сработает. Но почему вы хотите остаться в версии кандидата-кандидата? – PierreDuc
Если не 'rc', какой стабильной версией я должен перенести свои зависимости? –