UNPKG

@chatterton/angular2-schema-form

Version:

Angular2 Schema Form (DISCLAIMER: it is not related to angular-schema-form)

13 lines (10 loc) 549 B
<div class="widget form-group"> <label [attr.for]="id" class="horizontal control-label"> {{ schema.title }} </label> <select [attr.required]="schema.required" [formControl]="control" [attr.name]="name" [attr.disabled]="schema.readOnly" class="form-control"> <option *ngFor="let option of schema.oneOf" [ngValue]="option.enum[0]" >{{option.description}}</option> </select> <span *ngIf="schema.help" class="formHelp">{{schema.help}}</span> <input *ngIf="schema.readOnly" [attr.name]="name" type="hidden" [formControl]="control"> </div>