File

src/app/modules/telemetry/directives/telemetry-error/telemetry-error.directive.ts

Description

TelemetryInteract Directive

Implements

OnChanges

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(telemetryService: TelemetryService)

Constructor to create injected service(s) object Default method of Draft Component class

Parameters :
Name Type Optional Description
telemetryService TelemetryService No

Reference of TelemetryService

Inputs

appTelemetryError
Type : IErrorEventInput

Interact event input

Methods

ngOnChanges
ngOnChanges()
Returns : void

Properties

Public telemetryService
Type : TelemetryService

reference of permissionService service.

import { Directive, Input, OnChanges } from '@angular/core';
import { IErrorEventInput } from '../../interfaces';
import { TelemetryService } from '../../services';

/**
 * TelemetryInteract Directive
 */
@Directive({
  selector: '[appTelemetryError]'
})
export class TelemetryErrorDirective implements OnChanges {
  /**
   * Interact event input
  */
  @Input() appTelemetryError: IErrorEventInput;
  /**
   * reference of permissionService service.
  */
  public telemetryService: TelemetryService;
  /**
  * Constructor to create injected service(s) object
  Default method of Draft Component class
  * @param {TelemetryService} telemetryService Reference of TelemetryService
  */
  constructor(telemetryService: TelemetryService) {
    this.telemetryService = telemetryService;
  }
  ngOnChanges() {
    if (this.appTelemetryError) {
      this.telemetryService.error(this.appTelemetryError);
    }
  }
}

results matching ""

    No results matching ""