nor*_*eny 6 primeng angular primeng-calendar
我想在我的应用程序中使用PrimeNG日历.当我运行代码时,我收到错误:
ReferenceError:未定义jQuery.
其他PrimeNG指令工作正常.如果我删除<p-calendar>错误消失.
我在我的应用中导入并包含了日历.顺便说一下,我正在使用最新版本的角度,路由器和表格.在此之前我遇到了这个问题,并通过更新表单提供程序来修复它
<p-calendar [(ngModel)]="date"></p-calendar>
Run Code Online (Sandbox Code Playgroud)
Stacktrace摘录:
ReferenceError:在DebugAppView._View_AddShipmentComponent0.detectChangesInternal(AddShipmentComponent.template.js)的Calendar.ngAfterViewInit(eval at(http:// localhost:8080/js/app.js:930:2),:44:90)中未定义jQuery. :930:59)在DebugAppView.Appte.detectChanges(eval at(http:// localhost:8080/js/vendor.js:716:2),:243:14)在DebugAppView.detectChanges(eval at(http:/) /localhost:8080/js/vendor.js:716:2),:348:44)
Ser*_*gio 10
您需要添加依赖项:
<!-- Datetimepicker, Slider, Schedule -->
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.1/jquery-ui-timepicker-addon.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5016 次 |
| 最近记录: |