Permalink
Browse files

added .call usage to readme

  • Loading branch information...
shimondoodkin committed Jul 2, 2010
1 parent da784da commit 9b8c91fc581fadffa386b4b30abe674cc92586f5
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
@@ -77,17 +77,17 @@ or
var loadtemplate=require('doubletemplate').loadtemplate; // only load template function
### example of using `parsedir` function:
- te.parsedir(__dirname+'/templates',{'app':app});
+ te.parsedir(__dirname+'/templates',this,{'app':app});
### example of using `loadfile` function:
- te.loadfile(__dirname+'/templates/filename.html',{'app':app},__dirname);
+ te.loadfile(__dirname+'/templates/filename.html',this,{'app':app},__dirname);
### in the code you can use:
- te.templates['subdir/filename.html']({name:'your name'});
+ te.templates['subdir/filename.html'].call(this,{name:'your name'});
### example of using `loadtemplate` function:
- var mytemplate=te.loadtemplate(__dirname+'/templates/filename.html',{'app':app});
- mytemplate({name:'your name'});
+ var mytemplate=te.loadtemplate(__dirname+'/templates/filename.html',this,{'app':app});
+ mytemplate.call(this,{name:'your name'});
the code is in stright forward logic you can read it and understand how it works.

0 comments on commit 9b8c91f

Please sign in to comment.