Reading the documentation I don't understand how I can change a class.
My component data looks like this:
props: [
'm_c_id',
'recipient_id',
'sender_id',
'userId'
],
Now if sender_id == userId I want to show this in my template:
<div class="msg-from-me">
<p>Hello</p>
</div>
or if recipient_id == userId I want to show this:
<div class="msg-from-them">
<p>Hello</p>
</div>
v-bind:class="{'msg-from-me': userId==m_sender_id, 'msg-from-them': userId==m_recipient_id}"