Skip to content

Instantly share code, notes, and snippets.

@JaeYeopHan
Last active April 24, 2018 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JaeYeopHan/ac32f084b12569a2e05d17fb5874a7ff to your computer and use it in GitHub Desktop.
Save JaeYeopHan/ac32f084b12569a2e05d17fb5874a7ff to your computer and use it in GitHub Desktop.
Example code to Marker component in post of state management posting
export class Marker extends EventEmitter {
constructor(
private id: number,
) {
super();
document.querySelector("marker").addEventListener("click", () => {
// do something
this.trigger("card_action", this.id);
});
}
do() {
// do something
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment