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

Precompile mustache templates

$
0
0
Hello guys,
I need help on precompiling mustache templates. I installed https://github.com/daffl/can-compile module, and now I have file (view.production.js) with single template in it:

  1. can.view.preload('common_templates_aboutMeSectionRegistrationTemplate_mustache',can.Mustache(function(_CONTEXT,_VIEW) { ...
I think I will need to change can.view, but I don't know what should I do with it so it will load the template from  view.production.js.

What should I change in, so it will load template from (view.production.js) 
  1. can.view('aboutMeSectionRegistrationTemplate', data, function(fragment) { ...}) 

Please help!

Viewing all articles
Browse latest Browse all 3491

Trending Articles