【发布时间】:2020-11-13 23:37:37
【问题描述】:
我正在使用 AngularJS 版本 - 1.5 实现 Jquery 菜单编辑器
Jquery Link - https://www.jqueryscript.net/menu/Drag-Drop-Menu-Builder-For-Bootstrap.html
Jquery Demo - https://www.jqueryscript.net/demo/Drag-Drop-Menu-Builder-For-Bootstrap
当我尝试从编辑项添加新元素时,它给了我以下错误。
Cannot read property 'reset' of undefined
at resetForm (<anonymous>:1182:18)
at MenuEditor.add (<anonymous>:1323:9)
截图 - Jquery Menu Editor
我正在使用的 Jquery 版本 -
jquery.min.js - 3.1.1
我担心的是为什么我无法使用带有 AngularJS 1.5 版本的 Jquery 来重置表单。
Cannot read property 'reset' of undefined
at resetForm (<anonymous>:1182:18)
$scope.editor = new MenuEditor('myEditor', {listOptions: $scope.sortableListOptions, iconPicker:
$scope.iconPickerOptions});
$scope.editor.setForm($('#frmEdit'));
//Not able to add
$('#btnAdd').click(function(){
editor.add();
});
如果有任何解决方案,请告诉我 - 会有所帮助。此外,如果您知道除此之外的任何其他插件,可以与 AngularJS 兼容,这对我也有很大帮助。
【问题讨论】:
标签: jquery angularjs jquery-plugins