File

projects/netgrif-components-core/src/lib/tabs/classes/tab-label-stream.ts

Index

Properties
Methods

Constructor

constructor(icon?: string, text?: string)
Parameters :
Name Type Optional
icon string Yes
text string Yes

Properties

Public Optional icon$
Type : BehaviorSubject<string | undefined>
Public Optional text$
Type : ReplaySubject<string>

Methods

Public destroy
destroy()
Returns : void
import {BehaviorSubject, ReplaySubject} from 'rxjs';

export class TabLabelStream {

    public icon$?: BehaviorSubject<string | undefined>;

    public text$?: ReplaySubject<string>;

    constructor(icon?: string, text?: string) {
        this.text$ = new ReplaySubject<string>(1);
        this.icon$ = new BehaviorSubject<string>(icon);
        if (!!text) {
            this.text$.next(text);
        }
    }

    public destroy(): void {
        this.text$.complete();
        this.icon$.complete();
    }

}

results matching ""

    No results matching ""