找到你要的答案

Q:NgTable get total of data

Q:ngtable得到总的数据

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

Plunker

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

如何返回所有数据的总数?(这是显示在ngtable数据长度)

plunker

  <pre>Total DATA: ...??</pre>
answer1: 回答1:

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

为得到你需要把数据在一定的范围内的变量,它将HTML方便数据的当前长度,目前你在VaR数据存储的数据,所以你需要做的scope.data美元=数据&;界面上你需要使用插补指令的长度

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

工作plunkr

angularjs  ngtable