I'm trying to use the example shown here http://bazalt-cms.com/ng-table/example/3
Here are some snippets of it:
<table ng-table="tableParams" class="table">
<tr ng-repeat="user in $data">
<td data-title="'Name'" sortable="'name'">
{{user.name}}
</td>
<td data-title="'Age'" sortable="'age'">
{{user.age}}
</td>
</tr>
</table>
This the data initialization at the js script:
var data = [{name: "Moroni", age: 50},
{name: "Tiancum", age: 43},
{name: "Jacob", age: 27},
{name: "Nephi", age: 29},
{name: "Enos", age: 34},
{name: "Tiancum", age: 43},
{name: "Jacob", age: 27},
{name: "Nephi", age: 29},
{name: "Enos", age: 34},
{name: "Tiancum", age: 43},
{name: "Jacob", age: 27},
{name: "Nephi", age: 29},
{name: "Enos", age: 34},
{name: "Tiancum", age: 43},
{name: "Jacob", age: 27},
{name: "Nephi", age: 29},
{name: "Enos", age: 34}];
There are two things I can not understand:
1. Why is there a $ sign in the ng-repeat clause? <tr ng-repeat="user in $data">
If i take the $ of, the example doesn't work.
I don't understand the $defer part in the example. I tried reading the docs and view examples about what defer does and just didn't get it. How calling:
$defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
}
effects the scope data parameter and is it related to the fact it has a dollar sign at the html (as i mentioned at the previous question)?