TypeError: newRawData.forEach is not a function问题解决
来源:互联网 发布:优化设计 编辑:程序博客网 时间:2024/06/05 07:05
TypeError: newRawData.forEach is not a function
是我在使用angular ui grid 时在ui grid.js中报的一个错误 。
其实对于这个问题的分析理解很简单:
forEach()是数组特有的一个方法,报forEach is not a function就说明newRawData不是一个数组。
但它又有这个属性,只是这个属性值是undefined,而不是一个function类型,这就说明newRawData是一个对象
所以解决问题的办法就是把newRawData改成数组类型
具体分析TypeError原因
ui-grid的表格数据要求是数组形式
但是初始化时把它设成空对象
正确方式应该是$scope.myData = [];
阅读全文
0 0
- TypeError: newRawData.forEach is not a function问题解决
- chrome浏览器Uncaught TypeError: object is not a function问题解决
- typeError: form.submit is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: string is not a function
- TypeError: e[h] is not a function
- Uncaught TypeError: object is not a function
- TypeError: jQuery(...).validationEngine is not a function
- TypeError: $(...).ajaxSubmit is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: object is not a function
- Uncaught TypeError: boolean is not a function
- Uncaught TypeError: $(...).appendChild is not a function
- TypeError: Buffer.allocUnsafe is not a function
- typeError: $(...).ajaxSubmit is not a function
- jquery TypeError: $.widget is not a function
- Uncaught TypeError: sum is not a function
- Stones
- 使用python在图片中如何添加文字?
- RH124-第一节-走进Linux以及基本操作
- UVA-10935Throwing cards away I
- LeetCode 637 Average of Levels in Binary Tree(二叉树层序遍历)
- TypeError: newRawData.forEach is not a function问题解决
- 二叉树的深度以及判断平衡二叉树
- Segmentfault 内容精选
- 浅谈ZKW线段树
- 用递归写最小钱币数
- H
- java 将list按照指定数量分成小list
- 暑期学习记录02
- ViewPager的 setOffscreenPageLimit(0) 方法