本文介绍了无法绑定到“ pickerType”,因为它不是“ owl-date-time”的已知属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
owl-date-time pickerType属性不适用于Angular 4。
owl-date-time pickerType property is not not working with Angular 4.
<owl-date-time [pickerType]="'timer'" [(ngModel)]="selectedStartDate" [min]="minDate">
无法绑定到 pickerType,因为它不是 owl-date的已知属性
Can't bind to 'pickerType' since it isn't a known property of 'owl-date-time'.
npm:ng-pick-datetime-highlight
npm: ng-pick-datetime-highlight
无法导入模块OwlDateTimeModule
Unable to import modules OwlDateTimeModule
推荐答案
您必须像这样将OwlDateTimeModule和OwlNativeDateTimeModule添加到您的@NgModule中:
You have to add OwlDateTimeModule and OwlNativeDateTimeModule to your @NgModule like this:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MyTestApp } from './my-test-app';
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
@NgModule({
imports: [
BrowserModule,
OwlDateTimeModule,
OwlNativeDateTimeModule,
],
declarations: [ MyTestApp ],
bootstrap: [ MyTestApp ]
})
export class MyTestAppModule {}
请参见此处:
这篇关于无法绑定到“ pickerType”,因为它不是“ owl-date-time”的已知属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!