this array contains atleast 10 objects
array: any[] = [];
When a function is called, an array is expected to contain both existing and new objects from "item".
function () {
var timeline = this.service.fetchservice(10)
.map((result : Response) => result.json())
.subscribe(item=> {
this.array.push(item);
});
}
error in console
ERROR TypeError: _this.array.push is not a function
something like:
this.results = this.results.concat(data.results);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With