ngtable的HTML页面中的'$ data'是什么 [英] What is '$data' in ngtable's HTML page
问题描述
我在显示表格时在HTML的这个地方使用ngtable
I am using ngtable and at this place in HTML while displaying table
<tr ng-repeat="row in $data">
我不了解$ data的用法,因为在ng-repeat的其他情况下不需要'$'.
I do not understand the use of $data, as '$' is not needed in other cases in ng-repeat.
推荐答案
ng-table
维护它自己的作用域,而$data
是该作用域中存在的数据,而不是该作用域中的完整数据集页面控制器.该属性由ngTableParams()
对象中的getData()
函数调用填充.
ng-table
maintains it's own scope, and $data
is the data which exists in this scope, rather than your full data set, which is on the scope of the page controller. It is the property that is populated by the getData()
function call in the ngTableParams()
object.
此用法和语法已被弃用,并已完全替换为当前的ng-table
源,该源现在从v2.0.0起以TypeScript编写.
This usage and syntax is deprecated, and has been replaced entirely in the current ng-table
source, which is now written in TypeScript as of v2.0.0.
这篇关于ngtable的HTML页面中的'$ data'是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!