2015-11-19 19:59:22 -05:00
|
|
|
<!-- #docregion -->
|
2015-12-03 15:41:58 -05:00
|
|
|
<!-- #docregion v2 -->
|
2015-11-19 19:59:22 -05:00
|
|
|
<h1>My First Attribute Directive</h1>
|
|
|
|
<h4>Pick a highlight color</h4>
|
|
|
|
<div>
|
|
|
|
<input type="radio" name="colors" (click)="color='lightgreen'">Green
|
|
|
|
<input type="radio" name="colors" (click)="color='yellow'">Yellow
|
|
|
|
<input type="radio" name="colors" (click)="color='cyan'">Cyan
|
|
|
|
</div>
|
2016-05-06 10:42:01 -04:00
|
|
|
<!-- #docregion pHost -->
|
2015-12-16 22:38:07 -05:00
|
|
|
<p [myHighlight]="color">Highlight me!</p>
|
2016-05-06 10:42:01 -04:00
|
|
|
<!-- #enddocregion pHost -->
|
2015-12-03 15:41:58 -05:00
|
|
|
<!-- #enddocregion v2 -->
|
|
|
|
|
|
|
|
<!-- #docregion defaultColor -->
|
2015-12-16 22:38:07 -05:00
|
|
|
<p [myHighlight]="color" [defaultColor]="'violet'">
|
|
|
|
Highlight me too!
|
|
|
|
</p>
|
2015-12-03 15:41:58 -05:00
|
|
|
<!-- #enddocregion defaultColor -->
|
2016-05-06 10:42:01 -04:00
|
|
|
<!-- #enddocregion -->
|