I have gone across the JavaScript questions on this topic, this question is specifically about Angular2 with TypeScript.
What I am trying to do is to concatenate the
You can also use the form recommended by ES6:
data => { this.results = [ ...this.results, data.results, ]; this._next = data.next; },
This works if you initialize your array first (public results = [];); otherwise replace ...this.results, by ...this.results ? this.results : [],.
public results = [];
...this.results,
...this.results ? this.results : [],
Hope this helps