Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (58 sloc) 1.39 KB
<form [ngFormModel]="myForm">
<!-- toggle unit of measure -->
<div class="unit">
<div class="label">Click to Toggle Unit of Measure</div>
<div class="labelTarget">
<button (click)="toggleUom()">{{uomLabel}}</button>
</div>
</div>
<!-- toggle gender -->
<div class="unit">
<div class="label">Click to Toggle Gender</div>
<div class="labelTarget">
<button (click)="toggleGender()">{{genderLabel}}</button>
</div>
</div>
<!-- set height -->
<div class="unit">
<div class="label">Height:</div>
<div class="labelTarget">
{{minHeight | height:false}}
<input type="range"
step="1"
[min]="minHeight"
[max]="maxHeight"
[(ngModel)]="heightValue"/>
{{maxHeight | height:false}}
<br/>
{{userProfile.heightInches | height:true}}
</div>
</div>
<!-- set weight -->
<div class="unit">
<div class="label">Weight ({{minWeight}} - {{maxWeight}}):</div>
<div class="labelTarget">
<input
type="number"
required=""
ngControl="weight"
#weightCtrl="ngForm"
[class.error]="!weightCtrl.valid"/>
{{weightUom}}.
</div>
</div>
<!-- set age -->
<div class="unit">
<div class="label">Age (13 - 120):</div>
<div class="labelTarget">
<input id="ageFrm"
type="number"
required=""
min="13"
max="120"
[(ngModel)]="ageValue"
#age="ngForm"
[class.error]="!age.valid"/>years
</div>
</div>
</form>