I’m running into the following issue:
I try to pass the results I get from retrieve_data.ts
to a property. I successfully get the results, however, when I import the function and I try to pass the values to the property info
, I get the this message:
TS2339: Property ‘info’ does not exist on type ‘{ name: string; components: { IonButtons: DefineComponent<IonButtons & InputProps, object, any, Record<string, ComputedGetter | WritableComputedOptions>, … 7 more …, {}>; … 5 more …; IonToolbar: DefineComponent<…>; }; data(): { …; }; created(): void; }’.
import useData from "../data/retrieve_data";
export default {
name: 'Home',
. . .
data(){
return{
info: [],
}
},
created(){
this.info=useData.data();
},
}
I have tried everything: setup, onMounted, return, clearing the cache, changing the name of the property and functions…nothing has worked out for me. I tried searching in the documentation but I couldn’t find anything useful. I don’t know what’s wrong. I’m new to Ionic and Vue but from what I know, that should be enough but probably I’m missing something but I have no idea what that could be.
Thank you in advance.