I know that a fetch is asynchronous and it needs to use "success" in fetch. But what if I want to use the data out of the success? I wanna to get the user ID and to use it in a model "Note".
authedUser.fetch({
success: function(){;
window.uid = authedUser.get("id");
}
But if I try to do this console.log(uid); not in success I get undefined.
Aucun commentaire:
Enregistrer un commentaire