[DOC] add example of inline statement in main doc

This commit is contained in:
Géry Debongnie
2019-10-25 14:56:09 +02:00
parent 2beb12678e
commit 1ca401811f
2 changed files with 7 additions and 5 deletions
+6
View File
@@ -190,6 +190,12 @@ class Counter extends Component {
}
```
Note that the `t-on-click` handler can even be replaced by an inline statement:
```xml
<button t-on-click="state.value++">
```
**Props:** sub components often needs some information from their parents. This
is done by adding the required information to the template. This will then be
accessible by the sub component in the `props` object. Note that there is an