Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Duplicating when closing when reopening app

$
0
0

@jonathan82 wrote:


  listarAgenda(){
    
    let prontuario = localStorage.getItem('matricula') ? localStorage.getItem('matricula') : sessionStorage.getItem('matricula');
    
    return this.dbapp.getDB()
    .then((db: SQLiteObject) => {
      db.executeSql(`select * from agendamento where prontuario = ${prontuario} `, [])
     
       .then((data) => {
       
        for (let i = 0; i < data.rows.length; i++) {
          let dados = data.rows.item(i);
          this.agentamento.push(dados);
          //console.log('Data Return: ' + dados)
    
        }

        }).catch((e) => console.error(e));

    }).catch((e) => console.error(e));


  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>