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

.model() returns undefined

$
0
0
Are there any requirements (e.g. dependencies, initializations, Model-functions, etc.) to do this in the latest build:

  1. //In EJS View 
  2. //...
  3. <tr <% = data[i] %>>
  4.       <td <%= data[i] %>>
  5.             <%= data.[i].txt %>
  6.       </td>
  7. </tr>

  8. // In Controller
  9. "tr click" : function(el)
  10. {
  11.       console.log(el.model()); // returns undefined

  12. "td click" : function(el)
  13. {
  14.       console.log(el.model()); // returns undefined


Otherwise my model-view-binding-automagic works like a charm.

Viewing all articles
Browse latest Browse all 3491

Trending Articles