ngx-dynamic-dashboard
Version:
an dashboard lib for angular 10
25 lines (23 loc) • 1.1 kB
TypeScript
import { Observable } from 'rxjs';
import { IEvent } from './IEvent';
/**
The grid is primarily controlled by MenuService Events. You can change the behavior by
changing the MenuComponent and have it call methods within the Grid component via Output Events
within the Menu component or by using the @ViewChild approach.
In the current code, the MenuService is shared by the GridComponent and MenuComponent.
The MenuComponent relays events from the various components that make up the MenuComponent.
The GridComponent listens for those events via an Observable. The GridComponent will also
raise/emit an event that will be picked up by the MenuComponent via the MenuService through an Observable as well.
*/
export declare class MenuEventService {
private menuSubject;
private gridSubject;
private subscribers;
constructor();
raiseMenuEvent(event: IEvent): void;
listenForMenuEvents(): Observable<IEvent>;
raiseGridEvent(event: IEvent): void;
listenForGridEvents(): Observable<IEvent>;
addSubscriber(subscriber: any): void;
unSubscribeAll(): void;
}