21 lines
648 B
HTML
21 lines
648 B
HTML
|
<!-- #docregion -->
|
||
|
<!-- #docregion v2 -->
|
||
|
<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>
|
||
|
<!-- #docregion span -->
|
||
|
<p><span [my-highlight]="color">Highlight me!</span></p>
|
||
|
<!-- #enddocregion span -->
|
||
|
<!-- #enddocregion v2 -->
|
||
|
|
||
|
<!-- #docregion defaultColor -->
|
||
|
<p><span [my-highlight]="color" [default-color]="'violet'">
|
||
|
Highlight me too!
|
||
|
</span></p>
|
||
|
<!-- #enddocregion defaultColor -->
|
||
|
<!-- #enddocregion -->
|