Click here to Skip to main content
15,888,251 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<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 ....

What I have tried:

I'm no getting the logic..plz help any one....
Posted
Updated 17-Sep-20 18:33pm
Comments
Karthik_Mahalingam 5-Sep-17 7:28am    
can you post the controller code.

 
Share this answer
 
Comments
Anilananda 6-Sep-17 4:41am    
thank you
Karthik_Mahalingam 6-Sep-17 7:49am    
welcome
can you add a dir paginate on the same
 
Share this answer
 
Comments
CHill60 18-Sep-20 4:33am    
If you have a question for the poster of the solution then use the "Have a Question or Comment?" link on that post. This is not a solution to the original question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900