bsalex/angular-loading-overlay

Console error

Closed this issue · 2 comments

Error if (overlayElement === undefined)

21b6978f7.vendor.js:9946 TypeError: Cannot read property 'isAttached' of undefined
    at updateOverlayElement (1b6978f7.vendor.js:46909)
    at 1b6978f7.vendor.js:46904
    at m.$emit (1b6978f7.vendor.js:9974)
    at notifyOverlays (1b6978f7.vendor.js:46953)
    at Object.stop (1b6978f7.vendor.js:46958)
    at c407714f.scripts.js:3256
    at 1b6978f7.vendor.js:9925
    at 1b6978f7.vendor.js:9958
    at m.$eval (1b6978f7.vendor.js:9973)
    at m.$digest (1b6978f7.vendor.js:9970)(anonymous function) @ 1b6978f7.vendor.js:9946(anonymous function) @ 1b6978f7.vendor.js:9919m.$emit @ 1b6978f7.vendor.js:9975notifyOverlays @ 1b6978f7.vendor.js:46953stop @ 1b6978f7.vendor.js:46958(anonymous function) @ c407714f.scripts.js:3256(anonymous function) @ 1b6978f7.vendor.js:9925(anonymous function) @ 1b6978f7.vendor.js:9958m.$eval @ 1b6978f7.vendor.js:9973m.$digest @ 1b6978f7.vendor.js:9970m.$apply @ 1b6978f7.vendor.js:9973g @ 1b6978f7.vendor.js:9926t @ 1b6978f7.vendor.js:9930u.onload @ 1b6978f7.vendor.js:9931
1b6978f7.vendor.js:47046 Uncaught TypeError: Cannot read property 'show' of null

I'm getting the same error;

TypeError: Cannot read property 'isAttached' of undefined
    at updateOverlayElement (lib.js:1158)
    at lib.js:1153
    at n.$emit (lib.js:180)
    at notifyOverlays (lib.js:1202)
    at Object.start (lib.js:1184)
    at Object.wrap (lib.js:1190)
    at link (script.js:1430)
    at lib.js:114
    at ja (lib.js:114)
    at n (lib.js:100)

By the way, I still trying make this work based on the examples but not succeed.

Follow the code:

app.run(function (bsLoadingOverlayService) {
  bsLoadingOverlayService.setGlobalConfig({
    delay: 0,
    activeClass: undefined,
    templateUrl: 'views/layouts/loading.html'
  });
});
bsLoadingOverlayService.wrap($timeout(function() {
  // function...
}, 0), { referenceId: 'a1f2e3' });
<div class="items bs-loading-container" bs-loading-overlay bs-loading-overlay-reference-id="a1f2e3">

Never mind! I was doing it wrong.

Using:

delay: 500,
activeClass: 'loading',

... I saw that was working.

My bad.