Replies: 1 comment 1 reply
-
|
Hi, what Maizzle framework version are you using? ( The condition should be written as I think this should also work: <if condition="!['paymentInAdvance', 'approval'].includes(type)">
...
</if>Finally, you could try a <switch expression="type">
<case n="'paymentInAdvance'">
...
</case>
<case n="'approval'">
...
</case>
<default>
...
</default>
</switch> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey. :)
I am using maizzle for a short time now and really love the framework so far! (Super fast and easytemplating with tailwind)
However, I stumbled across some cases where I need to chain multiple conditions within one if (else if) and can not figure out, how to properly do this.
Let's say I got a component.html using another subcomponent. This subcomponent is dynamic and used in different components. By passing a 'type' to this component i want to render different tables / styles. How can I check for multiple conditions within the subcomponent using the || or && operator?
component.html referring to my subcomponent
<component type="approval" src="subComponent.html"/>Condition within my subcomponent does not work
<if condition="type !== 'paymentInAdvance' || 'approval'"> [...] </if>Beta Was this translation helpful? Give feedback.
All reactions