Skip to content

Commit

Permalink
feat(label): append with an asterisk when required (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad authored Oct 9, 2017
1 parent ecf5e0f commit bad3ecb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui-bootstrap/src/wrappers/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { FieldWrapper } from '@ngx-formly/core';
@Component({
selector: 'formly-wrapper-label',
template: `
<label [attr.for]="id" class="form-control-label">{{ to.label }}</label>
<label [attr.for]="id" class="form-control-label">
{{ to.label }}
{{ to.required ? '*' : '' }}
</label>
<ng-template #fieldComponent></ng-template>
`,
})
Expand Down

0 comments on commit bad3ecb

Please sign in to comment.