Using v-if within List-item

Hi All,

I tried to use v-if within list-item is not working:

<f7-list-item
        swipeout
        v-for="(contact, index) in contacts"
        :key="index"
        :title="contact.name"
        after-title="`<p v-if='contact.userType=='2''>Moderator</p>`"
        :subtitle="contact.userStatus"
      >

But it works within

tag:

<p v-if='contact.userType=='2''>Moderator</p>

How can I make the v-if to run within list-item structure?

Thanks

Nosa Osahon

Your code is not a valid Vue code. Use slots:

<f7-list-item
        swipeout
        v-for="(contact, index) in contacts"
        :key="index"
        :title="contact.name"
        :subtitle="contact.userStatus"
      >
       <p slot="after" v-if="contact.userType=='2'">Moderator</p>

Thanks. That works .