How to insert single <li>? [closed]

I am trying to handle multi-level menu with AlpineJS. Is it posible to insert single <ul> (or </li>) in the code below?

<template x-if="item.has_children">
    <!-- insert <ul> here-->
</template>
<template x-if="! item.has_children">
    <!-- insert </li> here-->
</template>
Вернуться на верх