We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const {Component, QWeb} = owl.core; class Child extends Component { constructor() { super(...arguments); this.template = "child" } } class App extends Component { constructor() { super(...arguments); this.template = "app"; this.widgets = { Child }; } } const qweb = new QWeb(TEMPLATES); const app = new App({qweb}); app.mount(document.body);
<templates> <div t-name="app"> <div t-if="0"/> <t t-else="" t-widget="Child" t-props="{ test: 0 }"/> </div> <div t-name="child"> <t t-esc="props.test"/> </div> </templates>
Crashes with the following error:
Invalid generated code while compiling template 'app': Unexpected token )
The text was updated successfully, but these errors were encountered:
If we split t-else and t-widget, works fine:
t-else
t-widget
<t t-else=""> <t t-widget="Child" t-props="{ test: 0 }"/> </t>
Sorry, something went wrong.
it is because you use the t-else with a falsy value. If you write <t t-else="1" t-widget="Child" t-props="{ test: 0 }"/>, it will work
<t t-else="1" t-widget="Child" t-props="{ test: 0 }"/>
6640644
No branches or pull requests
Crashes with the following error:
The text was updated successfully, but these errors were encountered: