Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created May 25, 2020 19:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lydemann/f5bd752b4f65c532279e2478d59267e1 to your computer and use it in GitHub Desktop.
element-component.ts
import { HostListener, ɵmarkDirty as markDirty } from '@angular/core';
export abstract class ElementComponent {
@HostListener('click', ['$event'])
@HostListener('change', ['$event'])
public runCD() {
markDirty(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment