projects/netgrif-components-core/src/lib/tabs/classes/tab-label-stream.ts
Properties |
Methods |
|
constructor(icon?: string, text?: string)
|
| Public Optional icon$ |
Type : BehaviorSubject<string | undefined>
|
| Public Optional text$ |
Type : ReplaySubject<string>
|
| 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();
}
}