Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/docs/_examples/user-input/dart/lib/app_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'package:angular2/core.dart';

import 'click_me_component.dart';
import 'click_me_component_2.dart';
import 'click_me2_component.dart';
import 'keyup_components.dart';
import 'little_tour_component.dart';
import 'loop_back_component.dart';
Expand All @@ -12,7 +12,7 @@ import 'loop_back_component.dart';
templateUrl: 'app_component.html',
directives: const [
ClickMeComponent,
ClickMeComponent2,
ClickMe2Component,
KeyUpComponentV1,
KeyUpComponentV2,
KeyUpComponentV3,
Expand Down
18 changes: 18 additions & 0 deletions public/docs/_examples/user-input/dart/lib/click_me2_component.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// #docregion
import 'package:angular2/core.dart';

@Component(
selector: 'click-me2',
template: '''
<button (click)="onClickMe2(\$event)">No! .. Click me!</button>
{{clickMessage}}''')
class ClickMe2Component {
String clickMessage = '';
int _clicks = 1;

void onClickMe2(dynamic event) {
var evtMsg =
event != null ? ' Event target is ' + event.target.tagName : '';
clickMessage = ('Click #${_clicks++}. ${evtMsg}');
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
/* 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: '''
// #docregion click-me-button
<button (click)="onClickMe()">Click me!</button>
// #enddocregion click-me-button
{{clickMessage}}''')
<button (click)="onClickMe()">Click me!</button>
{{clickMessage}}''')
class ClickMeComponent {
String clickMessage = '';

onClickMe() {
void onClickMe() {
clickMessage = 'You are my hero!';
}
}
// #enddocregion click-me-component

This file was deleted.