elemen pada klik pendengar renderer2 angular2

export class MyComponent implements OnInit, OnDestroy {

  public removeEventListener: () => void;

  constructor(
    private renderer: Renderer2, 
    private elementRef: ElementRef
  ) {
  }

  public ngOnInit() {
    this.removeEventListener = this.renderer.listen(this.elementRef.nativeElement, 'click', (event) => {
      // Write your code...
    });
  }

  public ngOnDestroy() {
    this.removeEventListener();
  }
}
Kamran Taghaddos