[DOC] misc small fixes

closes #827, #825, #822, #821
This commit is contained in:
Géry Debongnie
2021-02-03 13:37:25 +01:00
committed by aab-odoo
parent 490cf18079
commit af426aa902
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -771,7 +771,7 @@ template rendered with `props`. In Owl, this can be done by
simply defining a template, that will access the `props` object:
```js
const Welcome = xml`<h1>Hello, {props.name}</h1>`;
const Welcome = xml`<h1>Hello, <t t-esc="props.name"/></h1>`;
class MyComponent extends Component {
static template = xml`
+5 -5
View File
@@ -15,7 +15,7 @@ use cases, there is no need to directly instantiate an observer.
For example, this code will display `update` in the console:
```javascript
const observer = new owl.Observer();
const observer = new owl.core.Observer();
observer.notifyCB = () => console.log("update");
const obj = observer.observe({ a: { b: 1 } });
@@ -39,14 +39,14 @@ is incremented every time the value is observed. Sometimes, it can be useful
to obtain that number:
```js
const observer = new owl.Observer();
const observer = new owl.core.Observer();
const obj = observer.observe({ a: { b: 1 } });
observer.deepRevNumber(obj.a); // 1
observer.revNumber(obj.a); // 1
obj.a.b = 2;
observer.deepRevNumber(obj.a); // 2
observer.revNumber(obj.a); // 2
```
The `deepRevNumber` can also return 0, which indicates that the value is not
The `revNumber` can also return 0, which indicates that the value is not
observed.
+1 -1
View File
@@ -44,7 +44,7 @@ Slots are defined by the caller, with the `t-set-slot` directive:
```xml
<div t-name="SomeComponent">
<div>some component</div>
<Dialog title="Some Dialog">
<Dialog title="'Some Dialog'">
<t t-set-slot="content">
<div>hey</div>
</t>