[IMP] component: remove support for inlineTemplate

closes #93
This commit is contained in:
Géry Debongnie
2019-05-15 11:15:08 +02:00
parent 9c1d369e94
commit 0a10bbc023
7 changed files with 473 additions and 344 deletions
+6 -6
View File
@@ -36,11 +36,6 @@ Here is a short example to illustrate interactive widgets:
```javascript
class ClickCounter extends owl.Component {
inlineTemplate = `
<button t-on-click="increment">
Click Me! [<t t-esc="state.value"/>]
</button>`;
state = { value: 0 };
increment() {
@@ -48,7 +43,12 @@ class ClickCounter extends owl.Component {
}
}
const qweb = new owl.QWeb();
const TEMPLATES = `
<button t-name="ClickCounter" t-on-click="increment">
Click Me! [<t t-esc="state.value"/>]
</button>`;
const qweb = new owl.QWeb(TEMPLATES);
const counter = new ClickCounter({ qweb });
counter.mount(document.body);
```