Micro  function     

plugin: jquery/view/micro

A very lightweight template engine. Magic tags look like:

{%= message %}

Micro is integrated in JavaScriptMVC so you can use it like:

$("#foo").html('//app/views/bar.micro',{});

Pros

  • Very Lightweight

Cons

  • Doesn't handle nested tags.
  • Doesn't handle {%= "%}" %}.
  • More difficult to debug.
  • Removes newlines and tabs.

Use

For more information on micro, see John Resig's write up.

Micro(str, data) -> undefined
{String}

template content.

{Object}

render's the template with this content.

{undefined}
© Jupiter IT - JavaScriptMVC Training and Support