File

src/lib/events.service.ts

Index

Properties
Methods

Constructor

constructor()

Methods

toggle
toggle(data)

This function is used to update the states in widget with data TODO: Not being used anymore have to cleanup

Parameters :
Name Optional Description
data No

TODO: Not being used anymore have to cleanup

Returns : void

Properties

Private _navItemSource
Default value : new BehaviorSubject<any>(0)
navItem$
Default value : this._navItemSource.asObservable()
registeredEvents
Type : Array<Object>
Default value : []
toggleMenuItem
Type : ReplaySubject<any>
Default value : new ReplaySubject(1)
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);
  }

}

results matching ""

    No results matching ""