我在有角度的fullcanlendar模块中遇到了麻烦,我确定我输入了'npm install --save ng-fullcalendar'。 ng-fullcalendar显示在node_modules文件夹中。但是当我键入 在app.component.html中,显示错误。
AppComponent.html:3 ERROR Error: No available FullCalendar view plugins.
at reduceDateProfile (main.js:5565)
at reduce (main.js:5527)
at Calendar.reduce (main.js:6652)
at Calendar.dispatch (main.js:6610)
at main.js:6583
at Calendar.batchRendering (main.js:6673)
at Calendar.hydrate (main.js:6580)
at new Calendar (main.js:6490)
at CalendarComponent.push../node_modules/ng-fullcalendar/fesm5/ng-fullcalendar.js.CalendarComponent.ngAfterViewInit (ng-fullcalendar.js:91)
at callProviderLifecycles (core.js:22416)
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {FullCalendarModule} from 'ng-fullcalendar';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {FormsModule} from '@angular/forms';
import {EventService} from './event.service';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
FullCalendarModule,
FormsModule
],
providers: [EventService],
bootstrap: [AppComponent]
})
export class AppModule { }
<p>Display event : {{displayEvent | json}}</p>
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar [options]="calendarOptions" (eventClick)="eventClick($event.detail)" (eventDrop)="updateEvent($event.detail)"
(eventResize)="updateEvent($event.detail)" (clickButton)="clickButton($event.detail)"></ng-fullcalendar>
</div>
答案 0 :(得分:0)
我找到了Angular FullCalendar here的工作演示。
因此,重要的是在特定文件中具有所有必需的导入和代码。
我已经列出了要检查的文件:
app.module.ts
app.component.html
app.component.ts
更新:我已经修改了有效的stackblitz演示,它现在使用Angular Fullcalendar实现。请使用Angular的Fullcalendar插件,因为不再支持旧的ng-calendar,它将被遗忘