I'm using Angular 6.
I would like to assign a local variable in for loop to avoid multiple call of the method.
<li *ngFor="let item of items">
<!-- Declare someItem variable here -->
<!-- let someItem = getSomeItemFromDifferentDataStructureUsingSomeLogic(item) -->
{{ someItem.name }}
{{ someItem.anotherValue }}
</li>
I don't also want to make a separate component to display someItem cause it is too trivial to create separate one.
What would be your's approach?
Many thanks for a help.