digipolisantwerp / antwerp-ui_angular

Antwerp UI is a component interface library for building user interfaces and responsive web apps.
https://digipolisantwerp.github.io/antwerp-ui_angular
MIT License
13 stars 19 forks source link

Get window from DOCUMENT injection token #121

Open tom-odb opened 5 years ago

tom-odb commented 5 years ago

Describe the bug

The WindowService still just attempts to access the global window. We should instead use the defaultView, available on the native document, which returns the native window in a browser environment. Since an InjectionToken for document is already provided by Angular, we can remove this dependency on a global variable.

To Reproduce

/

Expected behavior

Don't use global variables.

Screenshots

/

OS (please complete the following information):

/

Additional context

Add any other context about the problem here.