- Please write following function in script file for sum two dynamic value from text box,
angular.module('App').filter('twosum', function() {
return function(items) {
var sum = 0;
items.forEach(function(item) {
if (item.item_count) {
sum += item.item_count;
}
})
return sum;
}
})
- In HTML/PHP file where you want to display above sum value write below short code,
<span>{{ table.fields | twosum }}</span>
Enjoy!
Excellent post. It is very inspiring and informative. Thank you for sharing this
ReplyDeleteWeb Design Company Kerala