V
V
Vanik Khachatryan2018-05-14 17:34:29
Vue.js
Vanik Khachatryan, 2018-05-14 17:34:29

How to make axios global in Vue?

How to include axios only once (for example, in main.js) so that later in all components you can simply use this.axios..., or this.$axios?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Erbol, 2018-05-14
@VaniXac

Vue.prototype.$axios = axios;

E
Evgeny Kulakov, 2018-05-14
@kulakoff Vue.js

vue-axios

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question