Skip to content

Instantly share code, notes, and snippets.

@leonsenft
Last active July 21, 2017 22:04
Show Gist options
  • Save leonsenft/97c6fcf923a8a4ef1f5ce8a42214b38e to your computer and use it in GitHub Desktop.
Save leonsenft/97c6fcf923a8a4ef1f5ce8a42214b38e to your computer and use it in GitHub Desktop.
Button component not leveraging metadata inheritance.
import 'package:angular/angular.dart';
import 'my_button_directive.dart';
@Component(
selector: 'my-button',
template: '<ng-content></ng-content>',
inputs: const ['disabled'],
outputs: const ['trigger'],
host: const {
'(click)': r'onClick($event)',
'(keypress)': r'onKeyPress($event)',
},
)
class MyButtonComponent extends MyButtonDirective {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment