### File

`src/lib/window-task-bar/window-task-bar.component.ts`

### Implements

`OnInit` `OnDestroy`

### Metadata

changeDetection | `ChangeDetectionStrategy.OnPush`
selector | `rxap-window-task-bar`
standalone | `true`
imports | `NgFor` `WindowTaskComponent`
styleUrls | `./window-task-bar.component.scss`
templateUrl | `./window-task-bar.component.html`

### Index

###### Properties

- Public cdr
- Public subscriptions
- Public windowService

### Constructor

`constructor(windowService: WindowService, cdr: ChangeDetectorRef)`
Defined in src/lib/window-task-bar/window-task-bar.component.ts:25

Parameters :

Name | Type | Optional
windowService | `WindowService` | No
cdr | `ChangeDetectorRef` | No

### Properties

Public cdr
Type : `ChangeDetectorRef`
Decorators : `@Inject(ChangeDetectorRef)`
Defined in src/lib/window-task-bar/window-task-bar.component.ts:29

Public subscriptions
Default value : `new Subscription()`
Defined in src/lib/window-task-bar/window-task-bar.component.ts:25

Public windowService
Type : `WindowService`
Decorators : `@Inject(WindowService)`
Defined in src/lib/window-task-bar/window-task-bar.component.ts:28

    import {
      ChangeDetectionStrategy,
      ChangeDetectorRef,
      Component,
      Inject,
      OnDestroy,
      OnInit,
    } from '@angular/core';
    import { WindowService } from '../window.service';
    import { Subscription } from 'rxjs';
    import { tap } from 'rxjs/operators';
    import { WindowTaskComponent } from './window-task/window-task.component';
    import { NgFor } from '@angular/common';

    @Component({
      selector: 'rxap-window-task-bar',
      templateUrl: './window-task-bar.component.html',
      styleUrls: [ './window-task-bar.component.scss' ],
      changeDetection: ChangeDetectionStrategy.OnPush,
      standalone: true,
      imports: [ NgFor, WindowTaskComponent ],
    })
    export class WindowTaskBarComponent implements OnInit, OnDestroy {

      public subscriptions = new Subscription();

      constructor(
        @Inject(WindowService) public windowService: WindowService,
        @Inject(ChangeDetectorRef) public cdr: ChangeDetectorRef,
      ) {
      }

      public ngOnInit(): void {
        this.subscriptions.add(this.windowService.activeCount$.pipe(
          tap(() => this.cdr.markForCheck()),
        ).subscribe());
      }

      public ngOnDestroy(): void {
        this.subscriptions.unsubscribe();
      }

    }

    <div class="tasks grow-0 flex flex-row flex-wrap">
      <rxap-window-task *ngFor="let window of windowService.allActiveWindows"
                        [window]="window"
                        class="grow-0">
      </rxap-window-task>
    </div>

`./window-task-bar.component.scss`

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""