Skip to content

Instantly share code, notes, and snippets.

@pjazdzewski1990
Created September 21, 2015 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjazdzewski1990/f72fa69c6da4f3630183 to your computer and use it in GitHub Desktop.
Save pjazdzewski1990/f72fa69c6da4f3630183 to your computer and use it in GitHub Desktop.
@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