Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

How to use $refs and the Vue 3 Composition API?

$
0
0

Hi im trying to hook up using ref in ionic input, however it wont work?

<template>
    <input ref="testRef" />                            --> working
    <ion-input ref="testRef"></ion-input>  --> **NOT WORKING**
    -- any workaround using $ref, i am trying to use google map

</template>

<script>
import { onMounted, ref } from "vue"
export default {
  name: 'App',
  setup() {
    const testRef = ref(null)
    onMounted(() => {
         console.log(testRef.value);
    });
    return {
      testRef
    }
  }
}
</script>
```html

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>