Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bltavares/underscorecanhaz.js
Template utility inspired on ICanHaz
https://github.com/bltavares/underscorecanhaz.js
Last synced: 28 days ago
JSON representation
Template utility inspired on ICanHaz
- Host: GitHub
- URL: https://github.com/bltavares/underscorecanhaz.js
- Owner: bltavares
- License: other
- Created: 2011-07-26T22:01:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-17T23:41:13.000Z (over 12 years ago)
- Last Synced: 2024-04-14T19:36:19.727Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
#_CanHaz.js
## Js templates based on Underscore.js (and inspired on ICanHaz)###Dependencies:
* Jquery
* Undescore.jsIt looks similar to andyet's [ICanHaz.js](http://icanhazjs.com/) (It's inspired on it), but uses the [Underscore.js](http://documentcloud.github.com/underscore/) 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__