I tried making a getter like the following but it produces a blank page:
get grandTotal() {
var i;
var sub_total;
var grand_total;
sub_total = this.product_price * this.quantity;
this.totals.push(sub_total);
for (i = 0; i < this.totals.length; i++) {
grand_total += this.totals[i];
}
return grand_total;
}
>
--
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/61bf24c2-4b3a-4c76-ab19-fc63c081b9aao%40googlegroups.com.