0

I want to check if the value is empty or not.

Paid :  <h6 v-for="pai in PaidAmount">
             <b v-if="pai.billno==report.bill_no" >
             {{pai.paid + report.paid}}</b>                                       
         </h6>

if {{pai.paid + report.paid}} is empty then i want to print only {{report.paid}}

3
  • pai.paid + report.paid == '' ? report.paid : 'something else' Commented Jul 20, 2018 at 14:35
  • I you are always going to display the report.paid, wouldn't the test really just be if pai.paid is empty? Commented Jul 20, 2018 at 14:38
  • if {{pai.paid + report.paid}} is empty then {{report.paid}} has to be empty as well - what do you want to print ? Commented Jul 20, 2018 at 15:22

1 Answer 1

1

Check this

   <h6 v-for="pai in PaidAmount">
                 <b v-if="pai.billno==report.bill_no" >
                 {{ (pai.paid + report.paid) ? (pai.paid + report.paid) : report.paid  }}
                 </b>            
             </h6>

Reference Taken

Sign up to request clarification or add additional context in comments.

2 Comments

if string interoplation is empty then i want to print some message
check reference Please

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.