File

projects/i-components/src/lib/services/radRibbonDropDownProvider.service.ts

Description

Service provider to notify ribbon Dropdown when something inside happens

Index

Properties
Methods
Accessors

Methods

emitItemClickEventAction
emitItemClickEventAction(data: any)

Emits item click action

Parameters :
Name Type Optional
data any No
Returns : void

Properties

Private itemClicked
Type : Subject<any>
Default value : new Subject<any>()

Accessors

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();
  }
}

result-matching ""

    No results matching ""