Adão Júnior c4ae1f1b1b docs(guide/lifecycle-hooks): add Dart version of example
NOTE: The Dart version generates fewer lifecycle events than the TS version.
See angular/angular#6498 for details.

closes #733
2016-01-21 16:34:17 -08:00

20 lines
495 B
Dart

// #docregion
import 'package:angular2/angular2.dart';
@Component(
selector: 'my-child',
template: '''
<div class="my-child">
<div>-- child view begins --</div>
<div class="child">{{hero}} is my hero.</div>
<div>-- child view ends --</div>
</div>
''',
styles: const [
'.child {background: Yellow; padding: 8px; }',
'.my-child {background: LightYellow; padding: 8px; margin-top: 8px}'
])
class ChildComponent {
@Input() String hero;
}