Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
Sum of all the column in angularjs
Anilananda Chakrabortty
Sep 5 2017 4:30 AM
204
Reply
<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....
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
How to learn Angular2 and angular4
how to bind Data to HTML control in angularjs with routing.