Created
June 3, 2017 08:42
-
-
Save t301000/087e32729de1ef63752f8d44c300ef27 to your computer and use it in GitHub Desktop.
20170531 作業實做參考
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="color" | |
[ngStyle]="{'background-color': myStyle}" | |
(click)="picked.emit(myStyle)"></div> | |
<div *ngIf="show; else edit" class="tweak"> | |
<input type="range" min="0" max="255" [(ngModel)]="r"> | |
<span style="color: red">{{ r }}</span><br /> | |
<input type="range" min="0" max="255" [(ngModel)]="g"> | |
<span style="color: green">{{ g }}</span><br /> | |
<input type="range" min="0" max="255" [(ngModel)]="b"> | |
<span style="color: blue">{{ b }}</span><br /> | |
<button (click)="show = false">Close</button> | |
</div> | |
<ng-template #edit> | |
<button (click)="show = true">Edit</button> | |
</ng-template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment