Created
June 16, 2016 18:38
-
-
Save brunodasilvalenga/b090c30e6194df4140cf7eb8950a181f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadAlunos() { | |
this.loadingShow(); | |
this.alunoData.getAluno().then((data) => { | |
this.alunos = []; | |
if(data.res.rows.length > 0) { | |
for(var i = 0; i < data.res.rows.length; i++) { | |
this.alunos.push( | |
{ | |
id: data.res.rows.item(i).id, | |
firstName: data.res.rows.item(i).firstName, | |
lastName: data.res.rows.item(i).lastName, | |
email: data.res.rows.item(i).email, | |
img: data.res.rows.item(i).img, | |
phone: data.res.rows.item(i).phone, | |
gender: data.res.rows.item(i).gender, | |
birthday: data.res.rows.item(i).birthday, | |
address: data.res.rows.item(i).address, | |
district: data.res.rows.item(i).district, | |
city: data.res.rows.item(i).city, | |
state: data.res.rows.item(i).state, | |
city: data.res.rows.item(i).city, | |
cep: data.res.rows.item(i).cep, | |
note: data.res.rows.item(i).note | |
} | |
); | |
} | |
}; | |
this.numberOfAlunos = this.alunos.length; | |
this.loadingHide(); | |
}, (error) => { | |
this.loadingHide(); | |
console.log("ERROR -> " + JSON.stringify(error.err)); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment