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

243
Views
Vue.js with Ionic 5: not working directives

So i have basically a problem that Vue.js directives such as v-model does not work with ionic 5. I follow guides on youtube using Ionic 4 and it just doesn't work for me for Ionic 5. For example to make the v-model work i needed to write this code:

<ion-input :value="name"
                @ionInput="name = $event.target.value;"
                @ionClear="searchCleared($event)" type="text" 
                placeholder="Enter name"></ion-input>
         <ion-label>{{name}}</ion-label>

(I've added the ion-label so i can see if the value is changing while i input letters). And in the script:

<script>
import { IonContent, IonPage} from '@ionic/vue';
import { defineComponent } from 'vue';
import axios from 'axios';
import {alertController} from '@ionic/vue';

export default defineComponent({
  name: 'Home',
  components: {
    IonContent,
    IonPage
  },

  data(){
    return{
      name: ""
    }
  },

  methods: {
..........

if I write it like this:

<ion-input v-model="name" type="text" placeholder="Enter name"></ion-input>
<ion-label>{{name}}</ion-label>

it does not work as intended

Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

<ion-item>
  <ion-label>An Input Field</ion-label>
  <ion-input v-model="inputField" type="text"></ion-input>
</ion-item>

you can just use v-model with latest version of ionic

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!