ariatemplates/hashspace — pull request #18 by mlaval (2013-12-13 17:24:21+00:00)
Title: fix #16 Variable update not processed

Fixed the initial display so that `{data.counter}` is correctly displayed.

About the updates part, as discussed with @b-laporte and @benouat , this is by design. The scope of the template is limited to its arguments and its controller. As a consequence, updates of the outside world do not trigger a refresh.

Updates will work if data is passed as an argument:
```
var json=require("hsp/json");

var data = {counter : 5};

setInterval(function(){
json.set(data, "counter", data.counter+1);
}, 1000);

# template count(arg)
Count: {arg.counter}
# /template

// display the template in the #output div
hsp.display(count(data),"output");
```