fullcalendar''没有导出的成员'选项'.-在Angular中获取错误

cor*_*114 10 fullcalendar fullcalendar-scheduler angular

我正在逐步关注这个ApNg2Fullcalendar安装结构,我使用的是Angular 5,

但我有以下错误 在此输入图像描述

node_modules/ap-angular2-fullcalendar/src/calendar/calendar.d.ts(3,10):错误TS2305:模块''fullcalendar''没有导出成员'选项'.node_modules/fullcalendar/dist/fullcalendar.d.ts(695,36):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(696,29):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(697,20):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(759,22):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(775,50):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(988,23):错误TS2304:找不到名称'JQueryEventObject'.node_modules/fullcalendar /距离/ fullcalendar.d.ts(1401,70):错误TS2304:找不到名称 'JQueryAjaxSettings'.node_modules/fullcalendar/dist/fullcalendar.d.ts(1603,50):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(1623,50):错误TS2304:找不到名称'JQueryPromise'.node_modules/fullcalendar/dist/fullcalendar.d.ts(2588,50):错误TS2304:找不到名称'JQueryPromise'.

怎么解决?我的index.component.ts

import { Component,  } from '@angular/core';
import 'Fullcalendar';



@Component({
  selector: 'app-index',
  templateUrl: './index.component.html',
  styleUrls: ['./index.component.css']
})
export class IndexComponent  {
  title = 'app';

  calendarOptions:Object = {
    height: 'parent',
    fixedWeekCount : false,
    defaultDate: '2016-09-12',
    editable: true,
    eventLimit: true, // allow "more" link when too many events
    events: [
      {
        title: 'All Day Event',
        start: '2016-09-01'
      },
      {
        title: 'Long Event',
        start: '2016-09-07',
        end: '2016-09-10'
      },
      {
        id: 999,
        title: 'Repeating Event',
        start: '2016-09-09T16:00:00'
      },
      {
        id: 999,
        title: 'Repeating Event',
        start: '2016-09-16T16:00:00'
      },
      {
        title: 'Conference',
        start: '2016-09-11',
        end: '2016-09-13'
      },
      {
        title: 'Meeting',
        start: '2016-09-12T10:30:00',
        end: '2016-09-12T12:30:00'
      },
      {
        title: 'Lunch',
        start: '2016-09-12T12:00:00'
      },
      {
        title: 'Meeting',
        start: '2016-09-12T14:30:00'
      },
      {
        title: 'Happy Hour',
        start: '2016-09-12T17:30:00'
      },
      {
        title: 'Dinner',
        start: '2016-09-12T20:00:00'
      },
      {
        title: 'Birthday Party',
        start: '2016-09-13T07:00:00'
      },
      {
        title: 'Click for Google',
        url: 'http://google.com/',
        start: '2016-09-28'
      }
    ]
  };

  onCalendarInit(initialized: boolean) {
    console.log('Calendar initialized');
  }

}
Run Code Online (Sandbox Code Playgroud)

app.module.ts

import { CalendarComponent } from 'ap-angular2-fullcalendar';
import { CalendarModule } from 'ap-angular2-fullcalendar';

@NgModule({
  declarations: [
    AppComponent,

    IndexComponent,

    CalendarComponent

  ],
  imports: [
    BrowserModule,
    NgbModule.forRoot(),
    AngularFontAwesomeModule,

    routes


  ],
Run Code Online (Sandbox Code Playgroud)

index.component.html

<angular2-fullcalendar [options]="calendarOptions" (initialized)="onCalendarInit($event)"></angular2-fullcalendar>
Run Code Online (Sandbox Code Playgroud)

小智 12

问题出在ap-angular2-fullcalendar node_modules中的fullcalendar包中.Fullcalendar已更新3.8.0但你需要3.7.0 ...我的解决方案是......

步骤1:npm install fullcalendar@3.7.0 --save;

第2步:在你的package.json中编写/编辑' postinstall '到" rm -Rf ./node_modules/app-angular2-fullcalendar/node_modules "

  • 谢谢您,先生,我已经安装了这个`npm install fullcalendar @ 3.6.1`现在 (2认同)