improve demo app

This commit is contained in:
Géry Debongnie
2019-03-18 14:34:35 +01:00
parent 65a65bd241
commit 1f602512a5
6 changed files with 41 additions and 16 deletions
+2 -4
View File
@@ -1,14 +1,12 @@
const template = `
export class Counter extends odoo.core.Component {
inlineTemplate = `
<div>
<button t-on-click="increment(-1)">-</button>
<span style="font-weight:bold">Value: <t t-esc="state.counter"/></span>
<button t-on-click="increment(1)">+</button>
</div>`;
export class Counter extends odoo.core.Component {
constructor(parent, props) {
super(parent, props);
this.inlineTemplate = template;
this.state = {
counter: props.initialState || 0
};