mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
16 lines
497 B
XML
16 lines
497 B
XML
|
|
<templates>
|
||
|
|
<div t-name="DemoComponent" t-on-click="increment" class="demo">
|
||
|
|
<div>Demo Sub Component</div>
|
||
|
|
<div>(click on me to update me)</div>
|
||
|
|
<div>Props: <t t-esc="props.n"/>, State: <t t-esc="state.n"/>. </div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div t-name="Root">
|
||
|
|
<button t-on-click="increment">Increment Parent State</button>
|
||
|
|
<button t-on-click="toggleSubComponent">Toggle SubComponent</button>
|
||
|
|
<div t-if="state.flag">
|
||
|
|
<DemoComponent n="state.n"/>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</templates>
|