I am dealing with a component that has two binded inputs, which are a large array and two markers indicating positions within the array.
This is how the component looks:
export class listSequence {
@Input() info: Data;
@Input() position: Markers;
..
...}
Here is what happens in the View:
I iterate through the bound data using @input, and utilize the markers (position.start and position.end) to only select specific elements from the array (note that these markers can change at any point).
<g *ngFor="#p of info.data | slice:position.start:position.stop+1 ; let i = index ">..</g>
Sometimes, when one of the markers changes while looping through the info.data, the results become inconsistent.
In certain cases, one or two iterations occur after the marker change (either position.start or position.stop).
Upon updating component.start, the iterations should range from i:0 to i:14