Basically the setup is almost the same as [[ One callback for multiple json requests ]], but I think the solution is too hacky and that it should be handle-able in a cleaner way in MVC.
‘Tickets’ and ‘People’ are distinct models and there is a getAll method to each. I need to initialize a plugin with data from both getAll methods. They could be ajax requests, but I want to make it oblivious to the plugin caller. I can’t think of a way, but I have no experience in MVC, any help guys? Or how should I clean it so that the mvc is cleaner?
I am trying to go after something like this. Thanks!!
Make sure that
.getAllreturns a$.Deferredobject so you can abstract away whether loading your models is asynchronous or not.