Patrice Chalin 283195685f docs(guide/user-input): follow-up to #1654 (#1770)
Mainly Dart-side review, following #1654:
- Updates to follow style guide
- Suites passed:
  public/docs/_examples/user-input/dart
  public/docs/_examples/user-input/ts

Note: the click-me2 component is not mentioned in the prose, maybe it
should be.
2016-06-28 08:25:12 -07:00

23 lines
514 B
Dart

/* FOR DOCS ... MUST MATCH ClickMeComponent template
// #docregion click-me-button
<button (click)="onClickMe()">Click me!</button>
// #enddocregion click-me-button
*/
// #docregion
import 'package:angular2/core.dart';
// #docregion click-me-component
@Component(
selector: 'click-me',
template: '''
<button (click)="onClickMe()">Click me!</button>
{{clickMessage}}''')
class ClickMeComponent {
String clickMessage = '';
void onClickMe() {
clickMessage = 'You are my hero!';
}
}