All files / app/formly form-group.wrapper.ts

33.33% Statements 6/18
33.33% Branches 6/18
50% Functions 1/2
16.66% Lines 2/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3410x                                                     10x            
import { Component, HostBinding } from '@angular/core';
import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';
 
@Component({
  selector: 'formly-wrapper-form-field',
  template: `
    <div>
      <!-- Label -->
    </div>
    <label class="nested-title">
      {{ props.label || '' }}
    </label>
 
    <div class="nested-form">
      <ng-template #fieldComponent></ng-template>
    </div>
 
    @if (props.footer) {
      <div class="nested-footer-left">
        <!-- Footer -->
      </div>
      <div class="nested-footer-right">
        <!-- Footer -->
      </div>
    }
  `,
})
export class FormlyWrapperFormGroup extends FieldWrapper<FormlyFieldConfig> {
  @HostBinding('title')
  get title() {
    return this.props.title || '';
  }
}