Skip to content

bltavares/UnderscoreCanHaz.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#_CanHaz.js

Js templates based on Underscore.js (and inspired on ICanHaz)

###Dependencies:

  • Jquery
  • Undescore.js

It looks similar to andyet's ICanHaz.js (It's inspired on it), but uses the Underscore.js template instead of Mustache.js

###Usage

You can call the template like:

 _chz.template_name(obj [,options]) #or
 _chz["template_name"](obj [,options] )

The default options are:

{
  raw: false, #return the html as an Jquery obj
  cache: true #cache the template based on the obj passed to it
 }

You can override the default by setting

_chz.defaults = { raw: true, cache: false }

Probably you are using Jquery and Underscore already, right?

Check the demo.

Licensed under LGPL

About

Template utility inspired on ICanHaz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published