# 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
operator
overlay
overlayRef
settings
settings$
source
thrownError
titlePortal$
width$
create

### Accessors

draggable
id
isMinimized
maxHeight
maxWidth
minHeight
minimizable
minWidth
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

##
Constructors

### constructor

- new WindowRef<D = any, R = any>(
  overlayRef: OverlayRef,
  overlay: Overlay,
  settings: WindowSettings<D>,
  ): 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<undefined | 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

### operator

operator: undefined | 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: undefined | 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[]) => any

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

#### 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(): undefined | boolean

  #### Returns undefined | boolean

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

### id

- get id(): undefined | string

  #### Returns undefined | 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(): undefined | string

  #### Returns undefined | string

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

### maxWidth

- get maxWidth(): undefined | string

  #### Returns undefined | string

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

### minHeight

- get minHeight(): undefined | string

  #### Returns undefined | string

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

### minimizable

- get minimizable(): undefined | boolean

  #### Returns undefined | boolean

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

### minWidth

- get minWidth(): undefined | string

  #### Returns undefined | string

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

### 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?: R): 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: any): 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: (value: R) => void): 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: R) => void

    a handler for each value emitted by the observable

  #### 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: (value: R) => void,
  promiseCtor: PromiseConstructorLike,
  ): Promise<void>

  #### Parameters

  - next: (value: R) => void

    a handler for each value emitted by the observable

  - 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 }

  - 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: Operator<R, R>): 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: R): 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: OperatorFunction<R, A>): 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: OperatorFunction<R, A>,
  op2: OperatorFunction<A, B>,
  ): 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: OperatorFunction<R, A>,
  op2: OperatorFunction<A, B>,
  op3: OperatorFunction<B, C>,
  ): 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: OperatorFunction<R, A>,
  op2: OperatorFunction<A, B>,
  op3: OperatorFunction<B, C>,
  op4: OperatorFunction<C, D>,
  ): 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: OperatorFunction<R, A>,
  op2: OperatorFunction<A, B>,
  op3: OperatorFunction<B, C>,
  op4: OperatorFunction<C, D>,
  op5: OperatorFunction<D, E>,
  ): 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: OperatorFunction<R, A>,
  op2: OperatorFunction<A, B>,
  op3: OperatorFunction<B, C>,
  op4: OperatorFunction<C, D>,
  op5: OperatorFunction<D, E>,
  op6: OperatorFunction<E, F>,
  ): 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: 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>,
  ): 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: 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>,
  ): 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: 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>,
  ): 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: 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>,
  ...operations: OperatorFunction<any, any>[],
  ): 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>
  - ...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: ComponentRef<any> | EmbeddedViewRef<any>): void

  #### Parameters

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

  #### Returns void

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

### setFooterPortal

- setFooterPortal(portal: Portal<any>): void

  #### Parameters

  - portal: Portal<any>

  #### Returns void

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

### setHeight

- setHeight(height: string): void

  #### Parameters

  - height: string

  #### Returns void

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

### setPos

- setPos(x: string, y: string): void

  #### Parameters

  - x: string
  - y: string

  #### Returns void

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

### setTitlePortal

- setTitlePortal(portal: Portal<any>): void

  #### Parameters

  - portal: Portal<any>

  #### Returns void

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

### setWidth

- setWidth(width: string): void

  #### Parameters

  - width: string

  #### Returns void

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

### subscribe

- subscribe(
  observerOrNext?: Partial<Observer<R>> | (value: R) => void,
  ): Subscription

  #### Parameters

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

  #### Returns Subscription

  Inherited from Subject.subscribe

  - Defined in node_modules/rxjs/dist/types/internal/Observable.d.ts:50
- subscribe(
  next?: null | (value: R) => void,
  error?: null | (error: any) => void,
  complete?: null | () => void,
  ): Subscription

  #### Parameters

  - `Optional` next: null | (value: R) => void
  - `Optional` error: null | (error: any) => void
  - `Optional` complete: null | () => 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<undefined | R>

  #### Returns Promise<undefined | 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: PromiseConstructor): Promise<undefined | R>

  #### Parameters

  - PromiseCtor: PromiseConstructor

  #### Returns Promise<undefined | 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: PromiseConstructorLike): Promise<undefined | R>

  #### Parameters

  - PromiseCtor: PromiseConstructorLike

  #### Returns Promise<undefined | 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