Last active
June 1, 2021 23:35
-
-
Save hum-n/d9782b028c89f0334079dae45c866574 to your computer and use it in GitHub Desktop.
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
import { component, event, Element } from 'nativeweb'; | |
@component('simple-event') | |
export class SimpleEvent extends Element { | |
@event() click = { | |
'@button': this.onClick() | |
}; | |
onClick() { | |
console.log('👆'); | |
} | |
render() { | |
return ` | |
<button @button>Click Me</button> | |
`; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment