# Class WindowRef<D, R>

#### Type Parameters

- D = any
- R = any

#### Hierarchy

- Subject<R>
  - WindowRef

- Defined in packages/angular/window-system/src/lib/window-ref.ts:21

#####
Index

### Constructors

constructor

### Properties

attachedRef$
closed
closed$
footerPortal$
hasError
height$
isStopped
observers
oldSizes
operator
overlay
overlayRef
settings
settings$
source
thrownError
titlePortal$
width$
create

### Accessors

draggable
id
isMinimized
maxHeight
maxWidth
minHeight
minWidth
minimizable
observed

### Methods

asObservable
close
complete
error
forEach
fullScreen
getHeight
getPos
getSizeConfig
getWidth
lift
minimize
next
pipe
reopen
setAttachedRef
setFooterPortal
setHeight
setPos
setTitlePortal
setWidth
subscribe
toPromise
unsubscribe
updateWindowSettings

## Constructors

### constructor

- new WindowRef<D, R>(overlayRef, overlay, settings): WindowRef<D, R>

- #### Type Parameters

  - D = any
  - R = any

  #### Parameters

  - overlayRef: OverlayRef
  - overlay: Overlay
  - settings: WindowSettings<D>

  #### Returns WindowRef<D, R>

  Overrides Subject<R>.constructor

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:47

## Properties

### attachedRef$

attachedRef$: ReplaySubject<ComponentRef<any> | EmbeddedViewRef<any>> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:31

### closed

closed: boolean

Inherited from Subject.closed

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:12

### `Readonly` closed$

closed$: Subject<R> = ...

#### Deprecated

removed. use the subscribe method and wait for the resolve event

- Defined in packages/angular/window-system/src/lib/window-ref.ts:29

### `Internal` footerPortal$

footerPortal$: ReplaySubject<Portal<any>> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:35

### hasError

hasError: boolean

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.hasError

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:19

### `Readonly` height$

height$: BehaviorSubject<string> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:24

### isStopped

isStopped: boolean

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.isStopped

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:17

### observers

observers: Observer<R>[]

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.observers

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:15

### `Private` `Internal` oldSizes

oldSizes: {
height: string;
pos: {
x: string;
y: string;
};
width: string;
} = null

stores the window size before fullScreen

#### Type declaration

- ##### height: string

- ##### pos: {
  x: string;
  y: string;
  }

  - ##### x: string

  - ##### y: string

- ##### width: string

- Defined in packages/angular/window-system/src/lib/window-ref.ts:45

### operator

operator: Operator<any, R>

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.operator

- Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:19

### `Protected` `Readonly` overlay

overlay: Overlay

- Defined in packages/angular/window-system/src/lib/window-ref.ts:49

### `Protected` `Readonly` overlayRef

overlayRef: OverlayRef

- Defined in packages/angular/window-system/src/lib/window-ref.ts:48

### `Protected` `Readonly` settings

settings: WindowSettings<D>

- Defined in packages/angular/window-system/src/lib/window-ref.ts:50

### settings$

settings$: ReplaySubject<WindowSettings<any>> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:40

### source

source: Observable<any>

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.source

- Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:15

### thrownError

thrownError: any

#### Deprecated

Internal implementation detail, do not use directly. Will be made internal in v8.

Inherited from Subject.thrownError

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:21

### `Internal` titlePortal$

titlePortal$: ReplaySubject<Portal<any>> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:39

### `Readonly` width$

width$: BehaviorSubject<string> = ...

- Defined in packages/angular/window-system/src/lib/window-ref.ts:23

### `Static` create

create: ((...args) => any)

Creates a "subject" by basically gluing an observer to an observable.

#### Type declaration

- - (...args): any

  - #### Parameters

    - `Rest` ...args: any[]

    #### Returns any

#### Nocollapse

#### Deprecated

Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.

Inherited from Subject.create

- Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:28

## Accessors

### draggable

- get draggable(): boolean

- #### Returns boolean

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:63

### id

- get id(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:55

### isMinimized

- get isMinimized(): boolean

- #### Returns boolean

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:83

### maxHeight

- get maxHeight(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:79

### maxWidth

- get maxWidth(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:75

### minHeight

- get minHeight(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:71

### minWidth

- get minWidth(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:67

### minimizable

- get minimizable(): boolean

- #### Returns boolean

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:59

### observed

- get observed(): boolean

- #### Returns boolean

  Inherited from Subject.observed

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:36

## Methods

### asObservable

- asObservable(): Observable<R>

- Creates a new Observable with this Subject as the source. You can do this to create custom Observer-side logic of the Subject and conceal it from code that uses the Observable.

  #### Returns Observable<R>

  Observable that the Subject casts to

  Inherited from Subject.asObservable

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:43

### close

- close(result?): void

- #### Parameters

  - `Optional` result: R

  #### Returns void

  #### Deprecated

  removed. use the complete method

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:91

### complete

- complete(): void

- #### Returns void

  Overrides Subject.complete

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:99

### error

- error(err): void

- #### Parameters

  - err: any

  #### Returns void

  Inherited from Subject.error

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:33

### forEach

- forEach(next): Promise<void>

- Used as a NON-CANCELLABLE means of subscribing to an observable, for use with APIs that expect promises, like `async/await`. You cannot unsubscribe from this.

  WARNING: Only use this with observables you know will complete. If the source observable does not complete, you will end up with a promise that is hung up, and potentially all of the state of an async function hanging out in memory. To avoid this situation, look into adding something like timeout, take, takeWhile, or takeUntil amongst others.

  #### Example

      import { interval, take } from 'rxjs';

      const source$ = interval(1000).pipe(take(4));

      async function getTotal() {
        let total = 0;

        await source$.forEach(value => {
          total += value;
          console.log('observable -> ' + value);
        });

        return total;
      }

      getTotal().then(
        total => console.log('Total: ' + total)
      );

      // Expected:
      // 'observable -> 0'
      // 'observable -> 1'
      // 'observable -> 2'
      // 'observable -> 3'
      // 'Total: 6'

  #### Parameters

  - next: ((value) => void)

    a handler for each value emitted by the observable

    - - (value): void

      - #### Parameters

        - value: R

        #### Returns void

  #### Returns Promise<void>

  a promise that either resolves on observable completion or rejects with the handled error

  Inherited from Subject.forEach

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:97
- forEach(next, promiseCtor): Promise<void>

- #### Parameters

  - next: ((value) => void)

    a handler for each value emitted by the observable

    - - (value): void

      - #### Parameters

        - value: R

        #### Returns void

  - promiseCtor: PromiseConstructorLike

    a constructor function used to instantiate the Promise

  #### Returns Promise<void>

  a promise that either resolves on observable completion or rejects with the handled error

  #### Deprecated

  Passing a Promise constructor will no longer be available in upcoming versions of RxJS. This is because it adds weight to the library, for very little benefit. If you need this functionality, it is recommended that you either polyfill Promise, or you create an adapter to convert the returned native promise to whatever promise implementation you wanted. Will be removed in v8.

  Inherited from Subject.forEach

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:109

### fullScreen

- fullScreen(): void

- #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:171

### getHeight

- getHeight(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:147

### getPos

- getPos(): {
  x: string;
  y: string;
  }

- #### Returns {
  x: string;
  y: string;
  }

  - ##### x: string

  - ##### y: string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:163

### getSizeConfig

- getSizeConfig(): OverlaySizeConfig

- #### Returns OverlaySizeConfig

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:114

### getWidth

- getWidth(): string

- #### Returns string

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:142

### lift

- lift<R>(operator): Observable<R>

- #### Type Parameters

  - R

  #### Parameters

  - operator: Operator<R, R>

  #### Returns Observable<R>

  #### Deprecated

  Internal implementation detail, do not use directly. Will be made internal in v8.

  Inherited from Subject.lift

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:31

### minimize

- minimize(): void

- #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:104

### next

- next(value): void

- #### Parameters

  - value: R

  #### Returns void

  Inherited from Subject.next

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:32

### pipe

- pipe(): Observable<R>

- #### Returns Observable<R>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:110
- pipe<A>(op1): Observable<A>

- #### Type Parameters

  - A

  #### Parameters

  - op1: OperatorFunction<R, A>

  #### Returns Observable<A>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:111
- pipe<A, B>(op1, op2): Observable<B>

- #### Type Parameters

  - A
  - B

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>

  #### Returns Observable<B>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:112
- pipe<A, B, C>(op1, op2, op3): Observable<C>

- #### Type Parameters

  - A
  - B
  - C

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>

  #### Returns Observable<C>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:113
- pipe<A, B, C, D>(op1, op2, op3, op4): Observable<D>

- #### Type Parameters

  - A
  - B
  - C
  - D

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>

  #### Returns Observable<D>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:114
- pipe<A, B, C, D, E>(op1, op2, op3, op4, op5): Observable<E>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>

  #### Returns Observable<E>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:115
- pipe<A, B, C, D, E, F>(op1, op2, op3, op4, op5, op6): Observable<F>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E
  - F

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>
  - op6: OperatorFunction<E, F>

  #### Returns Observable<F>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:116
- pipe<A, B, C, D, E, F, G>(op1, op2, op3, op4, op5, op6, op7): Observable<G>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E
  - F
  - G

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>
  - op6: OperatorFunction<E, F>
  - op7: OperatorFunction<F, G>

  #### Returns Observable<G>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:117
- pipe<A, B, C, D, E, F, G, H>(op1, op2, op3, op4, op5, op6, op7, op8): Observable<H>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E
  - F
  - G
  - H

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>
  - op6: OperatorFunction<E, F>
  - op7: OperatorFunction<F, G>
  - op8: OperatorFunction<G, H>

  #### Returns Observable<H>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:118
- pipe<A, B, C, D, E, F, G, H, I>(op1, op2, op3, op4, op5, op6, op7, op8, op9): Observable<I>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E
  - F
  - G
  - H
  - I

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>
  - op6: OperatorFunction<E, F>
  - op7: OperatorFunction<F, G>
  - op8: OperatorFunction<G, H>
  - op9: OperatorFunction<H, I>

  #### Returns Observable<I>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:119
- pipe<A, B, C, D, E, F, G, H, I>(op1, op2, op3, op4, op5, op6, op7, op8, op9, ...operations): Observable<unknown>

- #### Type Parameters

  - A
  - B
  - C
  - D
  - E
  - F
  - G
  - H
  - I

  #### Parameters

  - op1: OperatorFunction<R, A>
  - op2: OperatorFunction<A, B>
  - op3: OperatorFunction<B, C>
  - op4: OperatorFunction<C, D>
  - op5: OperatorFunction<D, E>
  - op6: OperatorFunction<E, F>
  - op7: OperatorFunction<F, G>
  - op8: OperatorFunction<G, H>
  - op9: OperatorFunction<H, I>
  - `Rest` ...operations: OperatorFunction<any, any>[]

  #### Returns Observable<unknown>

  Inherited from Subject.pipe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:120

### reopen

- reopen(): void

- #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:108

### setAttachedRef

- setAttachedRef(attachedRef): void

- #### Parameters

  - attachedRef: ComponentRef<any> | EmbeddedViewRef<any>

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:204

### setFooterPortal

- setFooterPortal(portal): void

- #### Parameters

  - portal: Portal<any>

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:192

### setHeight

- setHeight(height): void

- #### Parameters

  - height: string

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:134

### setPos

- setPos(x, y): void

- #### Parameters

  - x: string
  - y: string

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:152

### setTitlePortal

- setTitlePortal(portal): void

- #### Parameters

  - portal: Portal<any>

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:198

### setWidth

- setWidth(width): void

- #### Parameters

  - width: string

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:126

### subscribe

- subscribe(observerOrNext?): Subscription

- #### Parameters

  - `Optional` observerOrNext: Partial<Observer<R>> | ((value) => void)

  #### Returns Subscription

  Inherited from Subject.subscribe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:50
- subscribe(next?, error?, complete?): Subscription

- #### Parameters

  - `Optional` next: ((value) => void)
    - - (value): void

      - #### Parameters

        - value: R

        #### Returns void

  - `Optional` error: ((error) => void)
    - - (error): void

      - #### Parameters

        - error: any

        #### Returns void

  - `Optional` complete: (() => void)
    - - (): void

      - #### Returns void

  #### Returns Subscription

  #### Deprecated

  Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments

  Inherited from Subject.subscribe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:52

### toPromise

- toPromise(): Promise<R>

- #### Returns Promise<R>

  #### Deprecated

  Replaced with firstValueFrom and lastValueFrom. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise

  Inherited from Subject.toPromise

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:122
- toPromise(PromiseCtor): Promise<R>

- #### Parameters

  - PromiseCtor: PromiseConstructor

  #### Returns Promise<R>

  #### Deprecated

  Replaced with firstValueFrom and lastValueFrom. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise

  Inherited from Subject.toPromise

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:124
- toPromise(PromiseCtor): Promise<R>

- #### Parameters

  - PromiseCtor: PromiseConstructorLike

  #### Returns Promise<R>

  #### Deprecated

  Replaced with firstValueFrom and lastValueFrom. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise

  Inherited from Subject.toPromise

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:126

### unsubscribe

- unsubscribe(): void

- #### Returns void

  Inherited from Subject.unsubscribe

  - Defined in node_modules/rxjs/dist/types/internal/Subject.d.ts:35

### `Private` updateWindowSettings

- updateWindowSettings(componentRef?): void
- `Private`

  Injects the window settings from the component ref injector and overwrites the settings

  #### Parameters

  - `Optional` componentRef: ComponentRef<any>

  #### Returns void

  - Defined in packages/angular/window-system/src/lib/window-ref.ts:219