イム私のイオン3プロジェクトにカレンダーを実装しようとするカレンダーを実装しようとしているが、私はこのエラーここは、Imは私のイオン3プロジェクト
ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'type' since it isn't a known property of 'ion-calendar'.
を得続けることは、私のapp.moduleある
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { CalendarModule } from "ion2-calendar";
@NgModule({
declarations: [
MyApp,
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
HttpModule,
CalendarModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
ここに私のhtml
<ion-content padding>
<ion-calendar [(ngModel)]="date"
(onChange)="onChange($event)"
[type]="type"
[format]="'YYYY-MM-DD'">
</ion-calendar>
であり、これはhtmlページ
のための私のTSですimport { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-calendar',
templateUrl: 'calendar.html',
})
export class CalendarPage {
date: string;
type: 'string'; // 'string' | 'js-date' | 'moment' | 'time' | 'object'
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
onChange($event) {
console.log($event);
}
ionViewDidLoad() {
console.log('ionViewDidLoad CalendarPage');
}
}
私はすでに、すべてのヘルプが 誰かが、それは、以下のページに示すように、あなたはimport
CalendarComponentOptions
クラスに必要なイオン3
? URL? – Sampath
私はこれを使っています。https://github.com/HsuanXyz/ion2-calendar – Alejandro