Я установил ngx-translate / core и ngx-translate / http-loader для интернационализации моего angular приложения Ссылочная ссылка . но пока я пытаюсь обслуживать код, отображается следующая ошибка:
ERROR in node_modules/@ngx-translate/core/public_api.d.ts(24,53): error TS2315: Type 'ModuleWithProviders' is not generic.
node_modules/@ngx-translate/core/public_api.d.ts(28,54): error TS2315: Type 'ModuleWithProviders' is not generic.
перед установкой @ ngx-translate , у меня есть следующие зависимости.
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
Но пока я пытаюсь использовать <p translate>Title</p>
, он показывает эту ошибку Поэтому я обновил его до версии 6.0.0 (ядро и формы)
Зависимости, которые мы используем в package.json
{
"name": "test-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular-devkit/build-optimizer": "0.0.8",
"@angular/animations": "^5.0.2",
"@angular/cdk": "^5.0.0-rc.1",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^6.0.0",
"@angular/flex-layout": "^2.0.0-beta.10-4905443",
"@angular/forms": "^6.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.0.0-rc.1",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"angular-froala-wysiwyg": "^2.7.3",
"chart.piecelabel.js": "^0.9.0",
"classlist.js": "^1.1.20150312",
"core-js": "^2.4.1",
"crypto-js": "^3.1.9-1",
"d3": "^4.12.2",
"d3-ng2-service": "^1.23.3",
"fast-xml-parser": "^3.12.16",
"file-saver": "^1.3.3",
"intl": "^1.2.5",
"jquery": "^3.2.1",
"material-design-icons": "^3.0.1",
"ng2-charts": "^1.6.0",
"ng2-password-strength-bar": "^1.2.0",
"ng4-loading-spinner": "^1.1.1",
"ngx-loading": "^1.0.14",
"rxjs": "^5.5.2",
"ua-parser-js": "^0.7.20",
"web-animations-js": "^2.3.1",
"xlsx": "^0.11.16",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.5.3",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.105",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
Пожалуйста, помогите
Спасибо