We are using progress spinner for every API call. And we registered spinner at the app module level. When we want spinner on dialog the spinner hiding back of the popup.

To fix this we are adding spinner tag in every dialog component HTML. even z index also not working here. we have tried mat progress spinner and other spinners as well but no use.

Can we have a solution for this issue?

2 Answers

Tirupathi Temburu On Best Solutions

I have made changes to the component as it should dynamically create and append to the body element. now this problem has been resolved.

const domElem = (this.componentRef.hostView as EmbeddedViewRef<any>)
            .rootNodes[0] as HTMLElement;

Community On

Inside the stackblitz demo, spinner is never activated because spinner is placed inside index.html. Bindigs are not meant to be inside index.html. If stackblitz was ok and corrupted later on somehow, all I can say now the SCSS and component templates look perfectly fine. Could you make sure your SCSS is compiled successfully in your local environment?