Last active
April 24, 2018 11:10
-
-
Save JaeYeopHan/ac32f084b12569a2e05d17fb5874a7ff to your computer and use it in GitHub Desktop.
Example code to Marker component in post of state management posting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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