私のアプリでPrimengカレンダーを使用したいのですが(http://www.primefaces.org/primeng/#/calendar)コードを実行するとエラーが発生します:ReferenceError:jQueryが定義されていません。 Primengの別のディレクティブもうまく動作します。 <p-calendar>
を削除するとエラーが表示されなくなります。Primeng Calendarエラー - 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' –