cancel
Showing results for 
Search instead for 
Did you mean: 

Load extrnal js file via component.js and include tag

Former Member
0 Kudos

Hi,

i have problem with loaded external js file, my example:


sap.ui.core.UIComponent.extend("Component", {

  metadata: {

     name: "MyCOmponent",

     version: "1.1",

      library: "my.component",

     includes: [

               'css/myStyle.css',

               'https://raw.githack.com/zloirock/core-js/v2.2.2/client/shim.min.js'

        ],

     }

}

and this example work correct in ff and chrome but in ie11 is error with load js file.

Error: File: UIComponent.js, Line: 6, Column: 283

if i load js file by script tag or jQuery.sap.includeScript() method everything is allright in all browsers.

Regards, Bart

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

did you try putting the js in your local project?

Former Member
0 Kudos

yes i put and try, is the same problem with that

junwu
Active Contributor
0 Kudos

i usually put js as lib(or module) in the project

Former Member
0 Kudos

I wrote that case work with jQuery.sap.includeScript() method

but i think is problem with include metdata tag in freamwork.

junwu
Active Contributor
0 Kudos

if you put the js in local, did you see any request is sent from network tab for that js?

Former Member
0 Kudos

it no depends where file is (localy or other server). Problem is during loaded by sapui5 and in console is error Error: File: UIComponent.js, Line: 6, Column: 283. And does not work only in Internet Explorer browser.