Mercer
Mercer

Reputation: 9986

NgTable get total of data

How can i return the total of all data .?(length of data which is shown in ngTable)

Plunker

  <pre>Total DATA: ...??</pre>

Upvotes: 2

Views: 1483

Answers (1)

Pankaj Parkar
Pankaj Parkar

Reputation: 136134

For getting the current length of the data you need to put data in some scope variable so that it would easily accessible on HTML, currently you have stored data in var data so you need to do $scope.data = data & on UI you need to use interpolation directive to gets its length

<pre>Total DATA: ...{{data.length}}</pre>

Working Plunkr

Upvotes: 1

Related Questions