Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
How to call method from div in vue

I have a div and I just want to render it on a condition, I also want to call the method if the condition comes true here is my code

 <div v-if="timetable === null" "mymethodhere">
      <h4>no data found</h4>
 </div>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try a watcher on timetable and if timetable === null do things.

  watch: {
    "timetable": function (newVal) {
       if (newVal === null) {
         ---> do things
       }
     }
   }
about 4 years ago · Juan Pablo Isaza Report

0

Maybe you can use a watcher on timetable

watch: {
    timetable(timetable){
        if (timetable === null){
            // ...
        } else {
            // ...
        }
    }
},

Official docs: https://vuejs.org/guide/essentials/watchers.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!