What is '$data' in ngtable's HTML page

吃可爱长大的小学妹 提交于 2019-12-30 17:28:10

问题


I am using ngtable and at this place in HTML while displaying table

<tr ng-repeat="row in $data">

I do not understand the use of $data, as '$' is not needed in other cases in ng-repeat.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/29507706/what-is-data-in-ngtables-html-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!