Anilananda Chakrabortty

Anilananda Chakrabortty

  • 1.6k
  • 423
  • 41.5k

Sum of all the column in angularjs

Sep 5 2017 4:30 AM
<table class="table table-hover table-responsive ">
<thead class="bg-primary">
<tr>
<th>Sl. No</th>
<th >Name</th>
<th>Age</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="employee in emp | filter:MyData>
<td>{{$index+1}}</td>
<td>{{employee.Name}}</td>
<td>{{employee.Age}}</td>
<td>{{employee.Salary}}</td>
</tr>
<tr>
<td>All TotalTotal</td>
<td>Total Age of n employees</td>
<td>Total Salary of n employees</td>
</tr>
</tbody>
</table>
==============================
This is my table ...at the end i want all totals of all employee age and salary...
i also used filter in my table ...
so total should work in runtime and as well as in the time of filter...
Here MyData is the filter Parameter ....
Can any one tell how to get the actual output

Sl. No Name Age Salary
1 aa 20 15000
2 bb 25 25000

Total 45 40000


It should work with filter ....
 I'm no getting the logic..plz help any one....
 

Brought to you by:

Answers (3)