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

Where should I be storing my Model data?

$
0
0
I make a request to an end point with something like this:

  1. MyModelClass.findAll().done(function(response) {
  2.       // And I get a Can model list back as 'response'
  3. });
Ok, so I need this data for my view and I'm currently storing it as a property on my controller's options object which I can update (.attr() ) with UI interactions and have live binding happen.  But where should the model's data, an observable, live in my mix of modelscontrols, and views?  I assume the model data should live within the model but the docs don't make this clear that I can find.

FYI, our app is fairly static as of now.  Mostly one time client side rendering but has some updating user selected select options such as row count, sort etc ... which just add params to the findAll/One call.

Thanks!

Viewing all articles
Browse latest Browse all 3491

Trending Articles