Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@JSExport
def main(target: html.Div): Unit = {
...
fetchData().onSuccess {
case s =>
thingsToDo = read[List[Task]](s.responseText)
// now you need to refresh the UI
}
def fetchData() = Ajax.get("https://sizzling-torch-788.firebaseio.com/dummyTask.json")
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment