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

Re : Mustache Template for CSS

$
0
0
You don't need to put a whole document's <html> in template but you can just insert (append) template that contains <style> tag into document's <head>.

  1. var myStyle = 'body: {background: red}'
  2. $('head').append(can.view.mustache('<style>{{myStyle}}</style>')({myStyle: myStyle}))

Viewing all articles
Browse latest Browse all 3491

Trending Articles