-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
I get the following error when using Overlay only when my data is returned from cache instead of pulled from the API.
TypeError: Cannot read property 'style' of null
at GlobalPositionStrategy.apply
This appears to come from line 159 in
https://github.com/angular/material2/blob/master/src/cdk/overlay/position/global-position-strategy.ts
What is the expected behavior?
No error
What is the current behavior?
The error occurs
What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master
): https://goo.gl/uDmqyY
StackBlitz starter (using latest npm
release): https://goo.gl/wwnhMV
https://stackblitz.com/edit/angular-ow2o5c
What is the use-case or motivation for changing an existing behavior?
It appears to be a timing related issue. I am attempting to create a waiting indicator service using the overlay components and the mat-spinner
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.0.1
Material/cdk 5.0.0.rc.2
Typescript 2.5.3