cancel
Showing results for 
Search instead for 
Did you mean: 

Blank page when loading UI5 app on SAP

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

alexandrefossati
Explorer

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.

Answers (1)

Answers (1)

ThorstenHoefer
Active Contributor
0 Kudos

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/

0 Kudos

thanks guys. I resolved it using ajax, It's working now.