I have integrated vue-cookies into my app in the main.ts file:
import VueCookies from 'vue-cookies';
...
const app = createApp(App)
.use(IonicVue)
.use(router)
.use(VueCookies,{
expires: '30d',
});
Despite adding the cookie variable, I am unable to access it. Various attempts have been made:
export default defineComponent({
...
methods:{
likePokemon(name: string){
window.$cookies.set("username", "test");
this.$cookies.get("username"));
Vue.cookie.get('access_token');
},
...
}
}
An error is encountered stating Property '$cookies' does not exist on type 'CreateComponentPublicInstance<{}