angular – Response time when consuming IONIC API 4

I consume a service and the next problem is that the first time I enter the view, the information is not loaded, to grab a second time if I load everything … I guess that's for the response time of the application, and I'm trying to do it with a promise but that does not work either … How can I control that for the information to load me the first time I'm there? enter the page

also try calling the function in the methods ngOnInit, ionViewDidLoad, ionViewDidEnte and unsuccessfully …


cargaCampos (id) {
let resp = this.http.get (this.url2) (resp => resp)
.subscribe ((rp: any) => {

if (rp.respuesta) {
this.CamposName.push (... rp.datos);
} else {
this.CamposName = [];

}, err => {

if (err.status == 0) {

return this.CamposName;


            ConsultNamesCampos () {

this.CamposName = this.form.loadCampos (this.id_formulario);


Version 4.10.3 of the CLI