In my page there is a button that generates a report. That report needs data that is loaded using a http call to a rest endpoint when the page is loaded, but I do not have a
One more solution:
Actually subscribe function takes three parameters:
onNext onError onCompleted
this._companyService.getCompanies().subscribe( (response) => { this.companiesModel = response; }, (err) => { console.log(err) }, (finally) => { console.log('finally') } );