0
I have the following function:
async function openModal() { // função chamada por um botão
buscarPessoas();
$('#Mymodal').modal({
backdrop: "static",
keyboard: false
})
}
async function buscarPessoas() {
await AgendamentoService.getOne(localStorage.getItem('agendamentoID')).success((res) => {
PessoaService.getOne(res.pessoaID).success((res) => {
console.log(res, '<')
$scope.pessoaNome = res.nome
$scope.pessoaCpf = res.cpf
})
})
my problem is that my "personal" and "personal" variables are only updated within the function itself, I cannot use them at other points of the code.
The variables mentioned above will be used within the modal that will be opened. However, I cannot update.
Some solution?
That here resolve your doubt?
– Maurício Silva