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

can.view.render returns document fragments instead of strings

$
0
0
I am having problems with can.view.render. I assumed it returns a string of html but it returns a document fragment.

See following example:

The table looks good, but if you inspect it you'd see it didn't append my cells into the rows.
It looks like this: 
<table>
      <tr></tr>
      <td><td>
      <td></td>
      <tr></tr>
      <td></td>
      ...
</table>

If I change my code to this, it works but I think that is not right way of working:
  1. var $row = $(can.view.render('#tpl_row', {}).firstChild);




Viewing all articles
Browse latest Browse all 3491

Trending Articles