v-if with backslash

Published 2 months ago by jamesjames

This one works fine

<p v-if="unread.type === 'aaa'">
  Quote accepted
</p>   

But this one does not work with backslash

<p v-if="unread.type === 'App\Notifications\QuoteAccepted'">
  Quote accepted
</p>    

How to solve this issue???

Best Answer (As Selected By jamesjames)
Cronix

Not sure, but try escaping the \ with an additional \. Basically double \\ instead of single.

Cronix
Cronix
2 months ago (786,650 XP)

Not sure, but try escaping the \ with an additional \. Basically double \\ instead of single.

jamesjames

@Cronix Yes perfect! simple!

Please sign in or create an account to participate in this conversation.