我想在我的應用程序中使用Primeng日曆(http://www.primefaces.org/primeng/#/calendar)當我運行代碼時,出現錯誤:ReferenceError:未定義jQuery。另一個Primeng指令正常工作。如果我刪除<p-calendar>
錯誤消失。Primeng日曆錯誤 - 未定義JQuery
我已經導入並在我的應用中包含日曆。 順便說一下,我正在使用角度,路由器和窗體的最新版本。在此之前,我有這個問題:https://github.com/primefaces/primeng/issues/549並通過更新表單提供程序來修復它。
<p-calendar [(ngModel)]="date"></p-calendar>
堆棧跟蹤摘錄:
ReferenceError: jQuery is not defined
at Calendar.ngAfterViewInit (eval at <anonymous> (http://localhost:8080/js/app.js:930:2), <anonymous>:44:90)
at DebugAppView._View_AddShipmentComponent0.detectChangesInternal (AddShipmentComponent.template.js:930:59)
at DebugAppView.AppView.detectChanges (eval at <anonymous> (http://localhost:8080/js/vendor.js:716:2), <anonymous>:243:14)
at DebugAppView.detectChanges (eval at <anonymous> (http://localhost:8080/js/vendor.js:716:2), <anonymous>:348:44)
如果你沒有一個,嘗試包括您的index.html參考,jQuery的。 – mifish
''依賴關係是:'jQuery UI Datepicker和DateTimePicker' –