Patrice Chalin ef66e38e54 docs(dev guide): Update 'Component Styles' prose (#1320)
Reowork Ts prose and add Dart prose/code

+ Updates to docs and example code

(Starting point for Dart code was taken from #1171.)
2016-05-10 08:51:23 +01:00

24 lines
457 B
Dart
Executable File

import 'package:angular2/core.dart';
import 'hero.dart';
// #docregion inlinestyles
@Component(
selector: 'hero-controls',
template: '''
<style>
button {
background-color: white;
border: 1px solid #777;
}
</style>
<h3>Controls</h3>
<button (click)="activate()">Activate</button>''')
class HeroControlsComponent {
@Input()
Hero hero;
void activate() {
hero.active = true;
}
}