PrimeNG安排fullcalendar错误

时间:2018-01-16 13:19:16

标签: angular fullcalendar primeng

我在我的一个项目中使用PrimeNG计划。安装PrimeNG后,我收到了JQuery的错误,但安装后错误就消失了。目前我收到此错误

this.schedule.fullCalendar is not a function

我注意到的另一件事是,如果我尝试安装FullCalendar,我会收到此消息

calender-view@0.0.0 C:\Users\x\Desktop\Projects\calenderView
+-- UNMET PEER DEPENDENCY @angular/compiler@5.2.0
+-- UNMET PEER DEPENDENCY @angular/core@5.2.0
-- fullcalendar@3.8.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @schematics/angular@0.1.13 requires a peer of @angular-devkit/schematics@0.0.46 but none was installed.
npm WARN @schematics/schematics@0.0.13 requires a peer of @angular-devkit/schematics@0.0.46 but none was installed.
npm WARN codelyzer@3.2.2 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.
npm WARN codelyzer@3.2.2 requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.

之后它不包含在package.json中 - &gt;依赖。直到现在,我已经安装了PrimeNG,时刻和JQuery。我做错了什么?

1 个答案:

答案 0 :(得分:0)

好的,终于找到了解决方案。 (得到了@Tarek-Adra对本期评论的回答 - https://github.com/primefaces/primeng/issues/255

所以,我先安装fullcalendar,

npm install fullcalendar --save

在.angular-cli.json中,我做了这个改动,

"styles": [
         ...
        "../node_modules/fullcalendar/dist/fullcalendar.min.css"
      ],
      "scripts": [
        ...
        "../node_modules/moment/min/moment.min.js",
        "../node_modules/fullcalendar/dist/fullcalendar.min.js"
      ],
...