Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to sum of first column of Amount and that amount of sum show into the debit total text box using angular.

I did not any idea about how to get particular cell of value and sum it that's why i cannot written code of angular


What I have tried:

<html>
<div class="sized">
  <table align="right" class="table table-striped table-bordered">
      <thead>
          <tr>
              <th>#</th>
              <th>Amount</th>
              <th>Discription</th>
              <th>Action</th>
          </tr>
      </thead>
      <tbody>
          <!-- <tr> -->
           <tr *ngFor="let notification of notificationArray; let i = index">
              <td>{{i+1}}</td>
              
              <td>
                  <input [(ngModel)]="notification.notificationLevel" placeholder="only numeric value" onkeypress='return event.charCode >= 48 && event.charCode <= 57' required class="form-control" type="text" name="amount" />
              </td>
              <td>
                  <input [(ngModel)]="notification.message" required class="form-control" type="text" name="description" />
              </td>
              <td>
                  <button class="btn btn-danger"  type="button" (click)="deleteNotification(i)">Delete</button>
              </td>
          </tr>
      </tbody>    
  </table>
</div>


</div>
            <div class="float-right">
                <label>Debit Total:</label>
                <input type="text" name="debittotal" class="form-control">
            </div>  
        </div>
</html>
Posted
Updated 10-Apr-19 0:55am
v3
Comments
Rajesh k bhushan 10-Apr-19 6:41am    
I did not any idea about how to get particular cell of value and sum it that's why i cannot written code of angular

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