Click here to Skip to main content
14,661,076 members
Rate this:
Please Sign up or sign in to vote.
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.

Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Comments
Anilananda 6-Sep-17 4:41am
   
thank you
Karthik_Mahalingam 6-Sep-17 7:49am
   
welcome
Rate this:
Please Sign up or sign in to vote.

Solution 2

can you add a dir paginate on the same
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100