I have a problem! I do not understand how I can make a condition - in a template - I do not need to print an item if array have item with key - "HIS" and length more than one. In other words, if the array includes only NIS (without other currencies) should not be shown... I think it should work like hasOwnProperty of object, right?
var currencies = {
"NIS": {
"income": 12,
"received" : 13
},
"USD" : {
"income": 122,
"received" : 113,
"nisCourse" : 3,4
}
};
and view of it thought ng-reapet
<div class="income_total_row"
ng-repeat-start="(key, value) in currencies track by $index"
ng-if="value.income != 0">
{{ value.income }}
</div>
<div class="income_total_row" ng-if="key !== 'NIS' && value.income != 0"
ng-repeat-end="">
{{ value.nisCourse }}
</div>
I tried to explain (