How to bring data from a rest API and translate them into an alert in ionic 3

0

Good afternoon everyone I hope someone can help me I need to know how to bring data from an api rest and have one of the data go to an alert. for example I have this alert and I want to bring the title from a rest api and place it in the alert someone knows how:

let prompt = this.alertCtrl.create({
       cssClass:'alert-danger',
       **title: '',**
        inputs: [
        {
          name: 'Usuario',
          placeholder: 'Usuario'

        },

        {
          name: 'Contraseña',
          placeholder: 'Contraseña'
        },

      ],
      buttons: [
        {
          text: 'Cancelar',
          handler: data => {
            console.log('Cancel clicked');
          }
        },
        {
          text: 'Iniciar Sesión',
          handler: data => {
            this.navCtrl.push(MenuPage);
          }
        }
      ]
    });
    prompt.present();
  }
  }
    
asked by Jose Raul Gutierrez Castro 09.03.2018 в 17:51
source

0 answers