You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While f-if is useful for testing truthiness, sometimes you need to check if a variable has a specific value.
For this cases I'd like to introduce an f-switch directive that would always go with a f-case one.
I have two alternative syntaxes in mind, the former being easier to implement than the latter as it would mostly reuse the code from f-if:
<templatef-switch="variable" f-case="1">
Content when variable is 1
</template><templatef-switch="variable" f-case="2">
Content when variable is 2
</template><templatef-switch="variable" f-case="3">
Content when variable is 3
</template>
OR
<templatef-switch="variable"><templatef-case="1">
Content when variable is 1
</template><templatef-case="2">
Content when variable is 2
</template><templatef-case="3">
Content when variable is 3
</template></template>
The text was updated successfully, but these errors were encountered:
While
f-if
is useful for testing truthiness, sometimes you need to check if a variable has a specific value.For this cases I'd like to introduce an
f-switch
directive that would always go with af-case
one.I have two alternative syntaxes in mind, the former being easier to implement than the latter as it would mostly reuse the code from
f-if
:OR
The text was updated successfully, but these errors were encountered: