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

What are the good practices to get model instance from view?

$
0
0
Hi. I've got a question about JMVC.
Consider I have rendered a list using 
  1. Model.findAll({}, function(entries){
  2.     $(.elm).html( $.View.render('//some_ejs.ejs', {entries: entries}));
  3. });
Now I've got 
  1. <ul>
  2.     <li>element1</li>
  3.     <li>element2</li>
  4.     <li>element3</li>
  5. </ul>
on the page, so my question is how to get a model instance out from rendered list element?

Viewing all articles
Browse latest Browse all 3491

Trending Articles