samedi 22 décembre 2018

finally() not working in Vuejs another app

Recently i did the tutorial: https://github.com/Hujjat/laravStart In this app i can successfully run vuejs app and axios.then.catch.finally or this.form.then.catch.finally But i added npm to my old project that was recently upgraded to laravel 5.7. In my app i can't add finally function. If i do, it says:

Uncaught TypeError: axios.post(...).then(...).catch(...).finally is not a function

My app.js:

    // require('./bootstrap');
import Vue from 'vue'
window.Vue = require('vue');
window.axios = require('axios');

import { Form, HasError, AlertError } from 'vform'
window.Form = Form;

I think my app.js is exactly same to the tutorial app.js for Form request. Another thing is that in the tutorial he did not use axios import anywhere but he smoothly used it. But without import, i can't use axios.then.... How he used without importing axios? How can i use finally with then.catch ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire