Provides an injectable wrapper for the window
object.
Inject this in your services/components and you will be able to easily mock or spy on the native window
object in your tests.
You can replace the default WINDOW
token provider, which allows you to mock the window
object.
See window-ref.service.spec.ts for examples.
core/src/window-ref/window-ref.service.ts
Properties |
|
constructor(nativeWindow: any)
|
||||||||
Creates an instance of WindowRef.
Parameters:
|
||||||||
Public Readonly nativeWindow |
Type: any
|
Decorators:
@Inject(WINDOW)
|
The native window provided by the `WINDOW` token of `@bespunky/angular-zen/core`. See `WindowRef` for details.
|