on 01-05-2022 6:52 AM
Hi all,
I'm trying to link GET request to button click[on dms] using view1.controller.js. Previously, there was some error regarding axios[see axios_error pic]. To rectify that error, I added in import statement at the beginning of the view1.controller.js[see import_axios pic]. However, redeploying the app & accessing it gives a blank page[see empty_page pic]. I'm not sure what is going wrong. Please assist.
axios-error.pngimport-axios.pngempty-page.png
I recommend you to use fetch or $ajax to call your API.
The import/from axios syntax that you're using is meant to be used in nodejs, that's why it's not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried to import the axios package like:
sap.ui.define([ 'xxx/utility/lib/axios' ], function( dummy_name ){ ...
You should put the axios.js library in the folder xxx/utility/lib/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.