```
calcGrandTotal(totals: any) {
this.grandTotal = this.totals.reduce((acc, item: any)=> {
return acc + item.product_qty * item.product_total;
}, 0);
}
```
Example Stackblitz: https://stackblitz.com/edit/angular-ivy-zxvi5c
On Saturday, July 25, 2020 at 11:55:00 AM UTC-4 [email protected] wrote:
> I set issubmitted to true in my onSubmit function and executed if
> (this.isSubmited == true) in my getter but it didn't remedy the problem.
>
>
>>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/angular/6d80df7f-3feb-450d-b2bb-dad296499702n%40googlegroups.com.