Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

missing javascript

  • Loading branch information...
commit 70788834033055ebe02fc2b0618e87c8f11a84fd 1 parent 1d2a465
▟ ▖▟ ▖ authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 README.md
16 README.md
View
@@ -122,6 +122,20 @@ For more information on the events look at [asyncxml](http://dodo.github.com/nod
Let's have another example:
```javascript
+function template(view) {
+ return new Template({schema:5}, function () {
+ this.$div({class:'user'}, function () {
+ var name = this.$a({class:'name'});
+ var about = this.$span({class:'about'});
+ view.on('set user', function setUser(user) {
+ name.text(user.name);
+ name.attr('href', user.url);
+ about.text(user.description);
+ });
+ setUser(view.currentUser);
+ });
+ });
+}
```
```coffeescript
@@ -133,7 +147,7 @@ template = (view) ->
setUser = (user) ->
name.text(user.name)
name.attr(href:user.url)
- abouot.text(user.description)
+ about.text(user.description)
view.on('set user', setUser)
setUser(view.currentUser)
Please sign in to comment.
Something went wrong with that request. Please try again.