Angular 类构造函数NgbDatepickerI18n在没有';新';
在从Angular 5更新到Angular 8之后,我在使用@ng bootstrap/ng bootstrap包中的日期选择器打开一个模式窗口时遇到了这个错误。尝试创建两个提供程序对象之一(NgbDatepickerI18n和NgbDateParserFormatter)时引发错误。除此之外,整个应用程序构建和运行良好Angular 类构造函数NgbDatepickerI18n在没有';新';,angular,datepicker,ecmascript-5,ng-bootstrap,Angular,Datepicker,Ecmascript 5,Ng Bootstrap,在从Angular 5更新到Angular 8之后,我在使用@ng bootstrap/ng bootstrap包中的日期选择器打开一个模式窗口时遇到了这个错误。尝试创建两个提供程序对象之一(NgbDatepickerI18n和NgbDateParserFormatter)时引发错误。除此之外,整个应用程序构建和运行良好 @Component({ selector: 'jhi-datepicker-termin', templateUrl: './datepicker-termi
@Component({
selector: 'jhi-datepicker-termin',
templateUrl: './datepicker-termin.component.html',
styleUrls: ['./../datepicker.style.scss', './datepicker-termin.style.scss'],
providers: [NgbDatepickerConfig,
{provide: NgbDatepickerI18n, useClass: DatepickerI18n},
{provide: NgbDateParserFormatter, useClass: NgbDatepickerParserFormatter}
],
})
export class DatepickerTerminComponent {
package.json:
"dependencies": {
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/core": "8.2.14",
"@angular/forms": "8.2.14",
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "8.2.14",
"@angular/router": "8.2.14",
"@ng-bootstrap/ng-bootstrap": "5.1.5",
...
"devDependencies": {
"@angular-devkit/build-angular": "0.803.22",
"@angular/cli": "8.3.22",
"@angular/compiler-cli": "8.2.14",
"@ngtools/webpack": "8.3.21",
...
"engines": {
"node": "12.14.0"
...
tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "target/www/app",
"lib": [
"es2018",
"dom"
],
"typeRoots": [
"node_modules/@types"
],
"baseUrl": "./",
"paths": {
"@angular/*": [
"../node_modules/@angular/*"
]
}
},
"include": [
"src/main/webapp/app",
"src/test/javascript/"
]
}
将target/lib切换到es6/es2015没有帮助。
使用jhipster为浏览器兼容推荐的最新版本的core.js。巴别塔没有使用。
很少有“不相关”的软件包过时了。这会导致问题吗?许多thx需要帮助或任何提示。运气好吗?我现在面临着同样的问题。运气好吗?我现在面临着同样的问题。