What is '$data' in ngtable's HTML page
Asked Answered
A

1

12

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.

Ardehs answered 8/4, 2015 at 6:44 Comment(1)
Use $data inside the HTML code, because this is what accesses getData():Bratcher
L
17

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.

Loney answered 8/4, 2015 at 7:12 Comment(4)
You beat me i was also looking at the souce code :D +1 for you.Hawes
link in dead please provide new linkSheetfed
Is there the documentation about this?Vanna
@Vanna there isn't any documentation still available from what I can find; This was an old syntax when the question was answered in 2015, and the syntax was deprecated in 2016, so it's unlikely to be currently documented, since it's use is not recommended.Loney

© 2022 - 2024 — McMap. All rights reserved.