merge two object arrays with Angular 2 and TypeScript?

前端 未结 6 683
长情又很酷
长情又很酷 2020-12-14 05:19

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

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 05:49

    try this

     data => {
                    this.results = [...this.results, ...data.results];
                    this._next = data.next;
                }
    

提交回复
热议问题