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.
23 lines
514 B
Dart
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!';
|
|
}
|
|
}
|