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

Render simple mustache template as scope value?

$
0
0
First off, I can't get it to work without [object DocumentFragment] being rendered.

Second, is it a bad idea to even do what I'm trying to do:
  1. can.Mustache.registerHelper("route-root", function()
  2. {
  3. return can.route.bindings.pushstate.root;
  4. });

  5. var message = 'this is a string with a <a href="{{route-root}}/something">link</a>.';

  6. scope.items.push(
  7. {
  8.     message: can.view(message, {}),
  9.     something: true
  10. });

Viewing all articles
Browse latest Browse all 3491

Latest Images

Trending Articles



Latest Images