src/lib/services/ajax-interaction-service/ajax-interaction.service.ts
AjaxInteractionService used to communicate any control with the AjaxComponents
AjaxInteractionBaseService
Properties |
|
Methods |
Accessors |
notifyClick | ||||||
notifyClick(event: EventData)
|
||||||
Notifies the click to the subscribed control
Parameters :
Returns :
void
|
Private clickEmitted |
Type : Subject<EventData>
|
Default value : new Subject<EventData>()
|
The click emitted subject |
ClickEmittedNotification |
getClickEmittedNotification()
|
Gets the notification for the click emit
Returns :
Observable<EventData>
|
import { Injectable } from '@angular/core';
import { EventData } from '@mobilize/base-components';
import { Observable, Subject } from 'rxjs';
import { AjaxInteractionBaseService } from '@mobilize/winforms-components';
/**
* AjaxInteractionService used to communicate any control with the AjaxComponents
*
* @export
* @class AjaxInteractionService
*/
@Injectable({ providedIn: 'root' })
export class AjaxInteractionService extends AjaxInteractionBaseService {
/**
* The click emitted subject
*
* @private
* @type {Subject<EventData>}
* @memberof AjaxInteractionService
*/
private clickEmitted: Subject<EventData> = new Subject<EventData>();
/**
* Gets the notification for the click emit
*
* @readonly
* @type {Observable<EventData>}
* @memberof AjaxInteractionService
*/
get ClickEmittedNotification(): Observable<EventData> {
return this.clickEmitted.asObservable();
}
/**
* Notifies the click to the subscribed control
*
* @param {EventData} event
* @memberof AjaxInteractionService
*/
notifyClick(event: EventData): void {
this.clickEmitted.next(event);
}
}