Cancel
Showing results for 
Search instead for 
Did you mean: 

Enable OS Bar V4 in Angular Application

I am trying to implement the OS Bar V4 in my application made using Angular. I followed the guidelines in the documentation and also based the changes I had to make to my app from this great example on how to add the OS Bar V4 in an Angular application.

 

The error I am getting when I load the app in my browser (Chrome) is the following:

 

main.d34aa40ff1c11c0944d3.js:1 ERROR Error: Expecting function got: undefined
    at t.wrap (polyfills.20d0bb3b90b253b298ff.js:1)
    at h (polyfills.20d0bb3b90b253b298ff.js:1)
    at polyfills.20d0bb3b90b253b298ff.js:1
    at Array.forEach (<anonymous>)
    at CustomElementRegistry.e.(/anonymous function) (https://mindsold-i2gtest-mindsold.eu1.mindsphere.io/polyfills.20d0bb3b90b253b298ff.js:1:35021)
    at CustomElementRegistry.value [as define] (custom-elements-es5-adapter.js:13)
    at new e (osbar.min.js?1548181496369:1)
    at osbar.min.js?1548181496369:1
    at Is (osbar.min.js?1548181496369:1)
    at osbar.min.js?1548181496369:1

Any ideas?

5 REPLIES 5

Re: Enable OS Bar V4 in Angular Application

Legend
Legend
Did the previous version of the mdsp bar work earlier in the same app or is this the first time the bar is integrated?

Re: Enable OS Bar V4 in Angular Application

Actually, it's the first time I integrate the OS Bar to this app.

Re: Enable OS Bar V4 in Angular Application

This is happeninng because of the problem with zone.js version larger than 0.8.26 in angular7 apps.

 

A current workaround is to revert your zone.js version to 0.8.26

 

npm install zone.js@0.8.26 --save

After that the OSBar should work again.

Re: Enable OS Bar V4 in Angular Application

Thanks @darthsn0wcat ! Worked like a charm!

Highlighted

Re: Enable OS Bar V4 in Angular Application

Experimenter
Experimenter

The previous version was not working and I have to reinstall that but that also did not help. I have to make the latest version-enabled and then it worked. I have also connected the iTunes account with that because of the old version it was giving iTunes error 9 while accessing the module.