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

Re : ejs in ejs?

$
0
0
`can.view(path)` returns a render function. I think it depends on the exact CanJS version but you either want:

  1. <%== can.view('//myapp/viewtemplates/myremplate')(this) %>
or
  1. <%== can.view('//myapp/viewtemplates/myremplate').render(this) %>
"this" contains the template variables, so you can replace with a more explicit set of variables.

BTW you should use mustache or stache templates, ejs is being deprecated and has some issues with live-binding.


Viewing all articles
Browse latest Browse all 3491

Trending Articles