Javascript 试图创建DataTable对象,但获取jquery错误
正在尝试创建DataTable对象,但获取错误:Javascript 试图创建DataTable对象,但获取jquery错误,javascript,jquery,angularjs,jquery-datatables,Javascript,Jquery,Angularjs,Jquery Datatables,正在尝试创建DataTable对象,但获取错误: TypeError: Cannot use 'in' operator to search for 'length' in at isArraylike (http://localhost:9100/bower_components/jquery/dist/jquery.js:539:27) at Function.jQuery.extend.map (http://localhost:9100/bower_components
TypeError: Cannot use 'in' operator to search for 'length' in
at isArraylike (http://localhost:9100/bower_components/jquery/dist/jquery.js:539:27)
at Function.jQuery.extend.map (http://localhost:9100/bower_components/jquery/dist/jquery.js:461:14)
at _fnFilterCreateSearch (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:3000:14)
at _fnFilter (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:2936:18)
at _fnFilterComplete (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:2838:4)
at _fnReDraw (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:2090:4)
at _fnInitialise (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:3280:3)
at HTMLTableElement.<anonymous> (http://localhost:9100/bower_components/datatables/media/js/jquery.dataTables.js:6521:5)
at Function.jQuery.extend.each (http://localhost:9100/bower_components/jquery/dist/jquery.js:374:23)
at jQuery.fn.jQuery.each (http://localhost:9100/bower_components/jquery/dist/jquery.js:139:17)
第二行是抛出错误的地方。我猜
oL
不是数据表的有效对象类型。如果数据表是什么版本?1.10.0、1.10.1或…?我使用数据表作为角度模块。此模块的bower.json文件指定:“依赖项”:{“angular”:“>=1.3.0”,“jquery”:“>=1.11.0”,“datatables”:“>=1.10.0”}
var oL = angular.element('#orderList');
var dt = oL.DataTable();