Skip to content

Commit

Permalink
Release tassembly 0.1.3
Browse files Browse the repository at this point in the history
* Allow dynamic options override at call time
  • Loading branch information
gwicke committed Jun 30, 2014
1 parent 6291798 commit f243563
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -65,6 +65,11 @@ var model = {
var html = tplFun(model);
```

Optionally, you can also override options at render time:

```javascript
var html = tplFun(model, options);
```

TAssembly spec
==============
Expand Down
32 changes: 16 additions & 16 deletions browser/tassembly.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tassembly",
"version": "0.1.2",
"version": "0.1.3",
"main": "tassembly.js",
"devDependencies": {
"browserify": "*"
Expand Down
4 changes: 2 additions & 2 deletions tassembly.js
Expand Up @@ -500,8 +500,8 @@ TAssembly.prototype.compile = function(template, options) {
//console.error(code);

var fn = new Function('c', 'options', code),
boundFn = function(ctx) {
return fn.call(self, ctx, opts);
boundFn = function(ctx, dynamicOpts) {
return fn.call(self, ctx, dynamicOpts || opts);
};
template.__cachedFn = boundFn;

Expand Down

0 comments on commit f243563

Please sign in to comment.