src/lib/events.service.ts
Properties |
Methods |
constructor()
|
Defined in src/lib/events.service.ts:14
|
toggle | ||||||
toggle(data)
|
||||||
Defined in src/lib/events.service.ts:22
|
||||||
This function is used to update the states in widget with data TODO: Not being used anymore have to cleanup
Parameters :
Returns :
void
|
Private _navItemSource |
Default value : new BehaviorSubject<any>(0)
|
Defined in src/lib/events.service.ts:10
|
navItem$ |
Default value : this._navItemSource.asObservable()
|
Defined in src/lib/events.service.ts:12
|
registeredEvents |
Type : Array<Object>
|
Default value : []
|
Defined in src/lib/events.service.ts:13
|
toggleMenuItem |
Type : ReplaySubject<any>
|
Default value : new ReplaySubject(1)
|
Defined in src/lib/events.service.ts:14
|
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
import { Observable, ReplaySubject } from 'rxjs'
// import {BehaviorSubject} from 'rxjs/BehaviorSubject';
@Injectable({
providedIn: 'root'
})
export class EventsService {
private _navItemSource = new BehaviorSubject<any>(0);
// Observable navItem stream
navItem$ = this._navItemSource.asObservable();
registeredEvents: Array<Object> = [];
toggleMenuItem: ReplaySubject<any> = new ReplaySubject(1)
constructor() { }
/**
* This function is used to update the states in widget with data
* @param {} data
* TODO: Not being used anymore have to cleanup
*/
toggle(data) {
this.toggleMenuItem.next(data);
}
}