projects/i-components/src/lib/services/radRibbonDropDownProvider.service.ts
Service provider to notify ribbon Dropdown when something inside happens
Properties |
|
Methods |
Accessors |
emitItemClickEventAction | ||||||
emitItemClickEventAction(data: any)
|
||||||
Emits item click action
Parameters :
Returns :
void
|
Private itemClicked |
Type : Subject<any>
|
Default value : new Subject<any>()
|
itemClickEvent |
getitemClickEvent()
|
Subscribe to this to trigger the click event when item has clicked
Returns :
Observable<any>
|
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
/**
* Service provider to notify ribbon Dropdown when something inside happens
*
* @export
* @class RadRibbonDropDownProviderService
*/
@Injectable()
export class RadRibbonDropDownProviderService {
/**
*
*
* @private
* @type {Subject<any>}
* @memberof RadRibbonDropDownProviderService
*/
private itemClicked: Subject<any> = new Subject<any>();
/**
* Emits item click action
*
* @param {*} data
* @memberof RadRibbonDropDownProviderService
*/
emitItemClickEventAction(data: any): void {
this.itemClicked.next(data);
}
/**
* Subscribe to this to trigger the click event when item has clicked
*
*
* @readonly
* @type {Observable<any>}
* @memberof RadRibbonDropDownProviderService
*/
get itemClickEvent(): Observable<any> {
return this.itemClicked.asObservable();
}
}