Skip to content

Instantly share code, notes, and snippets.

@hum-n
Last active June 1, 2021 23:35
Show Gist options
  • Save hum-n/d9782b028c89f0334079dae45c866574 to your computer and use it in GitHub Desktop.
Save hum-n/d9782b028c89f0334079dae45c866574 to your computer and use it in GitHub Desktop.
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