Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : render view with data from two models

$
0
0
If you want to load them in parallel you can use $.when:

  1. $.when(Todo.findAll({}), User.findOne({id : 5}).then(function(todos, user){
  2.     ...do stuff
  3. })

Viewing all articles
Browse latest Browse all 3491

Trending Articles