title: Make a Select-List with Database Data - Ionic 3
body: <p>I'm having trouble making a select-list with data from the database.
  I followed some internet tutorials, but to no avail.
  If someone can post an example or point out what I am wrong.
  I will be very grateful, therefore, I must do when loading page 3 Select-lists.</p>
  
  <p><strong>auth_pagto.ts</strong></p>
  
  <pre><code>empresa(user) {
      //user.sidBanco = "bda1";
      var headers = new Headers();
      headers.append('Content-Type', 'application/json; charset=utf-8');
  
      return new Promise(resolve =&gt; {
          this.http.post('/itpowerbr-api/login/empresa', JSON.stringify(user), {headers: headers}).subscribe(data =&gt; {
                console.log("ENTROU");
  
                var mostraEmpresa: any[];
                //lista das empresas
                data.json().each(data, function(i, x){
                    //mostraEmpresa += '&lt;ion-option value="'+ x.empresaNome +'" &gt;'+ x.empresaID +' - '+ x.empresaNome +'&lt;/ion-option&gt;';
                    //{description: "Fazer compras", priority: "7", horary: "22:20"},
                    this.mostraEmpresa = [
                      {description: x.empresaNome, priority: x.empresaID}
                    ];
                });
                //$("#pgt-lista-filial").html(mostraEmpresa);
                resolve(mostraEmpresa);
          }, (err) =&gt; {
            if ( err.status == 500 ){
              var alert = this.alertCtrl.create({
                        title: "Pagamentos",
                        subTitle: "Lista Empresa não Encontrada",
                        buttons: ['ok']
                    });
              alert.present();
              resolve(false);
            }else{
              var alert = this.alertCtrl.create({
                        title: "Pagamentos",
                        subTitle: err,
                        buttons: ['ok']
                    });
              alert.present();
              resolve(false);
            }
          });
  
  
      });
  
  
  
  }// fim
  </code></pre>
  
  <p><strong>pagamento.ts</strong></p>
  
  <pre><code>import { Component } from '@angular/core';
  import { IonicPage, NavController, NavParams, AlertController, LoadingController } from 'ionic-angular';
  import { Auth_Pgto } from './auth_pgto';
  import { AuthService } from '../login/authservice';
  import { Storage } from '@ionic/storage';
  
  import { LoginPage } from '../login/login';
  
  @IonicPage()
  @Component({
    selector: 'page-pagamentos',
    templateUrl: 'pagamentos.html',
  })
  export class PagamentosPage {
  
    usercreds = {
        //nomeUsuario: '',
        //token: ''
     };
  
  private _lista: any;
  
  constructor(public navCtrl: NavController, public storage: Storage, public navParams: NavParams, public authservice: AuthService, public auth_pgto: Auth_Pgto, public alertCtrl: AlertController, public loadingCtrl: LoadingController) {
    var usuario = new Object();
    usuario = {
      nomeUsuario: window.localStorage.getItem('usuario'),
      token: window.localStorage.getItem('raja')
    };
  
    this.auth_pgto.empresa(usuario).then(data =&gt; {
      this._lista = data;
    });
  
    }// fim
  
    logout() {
          this.authservice.logout();
          this.navCtrl.setRoot(LoginPage);
    }
  
    public event = {
      month: '2017-07-01',
      timeStarts: '07:43',
      timeEnds: '1990-02-20'
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad PagamentosPage');
    }
  
  }
  </code></pre>
  
  <p><strong>pagamentos.html</strong></p>
  
  <pre><code>&lt;ion-content padding&gt;
    &lt;ion-list&gt; &lt;!-- LISTA EMPRESA --&gt;
      &lt;ion-item *ngFor="#_lista of _lista"&gt;
      &lt;ion-label&gt;Empresa&lt;/ion-label&gt;
       {{lista.description}}
      &lt;/ion-item&gt;
    &lt;/ion-list&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>thank you so much.</p>