Как использовать даты реакции в проекте Angular 7
Я хотел использовать плагин в Angular 7 проекта, следуя инструкциям ниже
https://github.com/larixsource/angular-react-dates
К сожалению, я не смог получить следующую ошибку:
Uncaught Error: Ошибки синтаксического анализа шаблона: невозможно связать с 'ngModel', поскольку оно не является известным свойством 'angular-date-range-picker'.
Полная версия ошибки:
core.js:12501 ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
Error: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
Can't bind to 'ngModel' since it isn't a known property of 'angular-date-range-picker'.
1. If 'angular-date-range-picker' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'angular-date-range-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<angular-date-range-picker [ERROR ->][(ngModel)]="selectedDateRange"></angular-date-range-picker>
"): ng:///BookingModule/ScheduleComponent.html@5:27
at syntaxError (compiler.js:2547)
at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:19495)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:25041)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:25028)
at compiler.js:24971
at Set.forEach (<anonymous>)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:24971)
at compiler.js:24881
at Object.then (compiler.js:2538)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:24880)
at syntaxError (compiler.js:2547)
at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:19495)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:25041)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:25028)
at compiler.js:24971
at Set.forEach (<anonymous>)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:24971)
at compiler.js:24881
at Object.then (compiler.js:2538)
at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:24880)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:14051)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)
defaultErrorLogger @ core.js:12501
push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:12549
next @ core.js:14528
schedulerFn @ core.js:10238
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:10222
(anonymous) @ core.js:14082
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:388
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:138
push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:14019
onHandleError @ core.js:14082
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:392
push../node_modules/zone.js/dist/zone.js.Zone.runGuarded @ zone.js:154
_loop_1 @ zone.js:677
api.microtaskDrainDone @ zone.js:686
drainMicroTaskQueue @ zone.js:602
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:500
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566