@chatterton/angular2-schema-form
Version:
Angular2 Schema Form (DISCLAIMER: it is not related to angular-schema-form)
10 lines (9 loc) • 584 B
HTML
<!-- Support number and range -->
<div class="widget form-group">
<label [attr.for]="id" class="horizontal control-label">
{{ schema.title }}
</label>
<div class="widget form-group">
<input [attr.required]="schema.required" [attr.readonly]="schema.readOnly?true:null" [name]="name" class="text-widget integer-widget form-control" [formControl]="control" [attr.type]="'number'" [attr.min]="schema.minimum" [attr.max]="schema.maximum" [attr.step]="schema.step" [attr.placeholder]="schema.placeholder" >
<span *ngIf="schema.help" class="formHelp">{{schema.help}}</span>
</div>