For rendering a template string you have to use the actual engine (can.view.mustache) because can.view will normally try to look up the string as a filename. The engine will return a renderer function that you can call with the data to get a document fragment or call rendererFunction.render() to get HTML content that you can include into a template (unescaped with {{{data}}}).
- var message = 'this is a string with a <a href="{{route-root}}/something">link</a>.';
- var renderer = can.view.mustache(message);
- renderer(data) // -> Document fragment
- renderer.render(data) // -> HTML