How to use the @ngx-formly/core/testing.createBuilder function in @ngx-formly/core

To help you get started, we’ve selected a few @ngx-formly/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngx-formly / ngx-formly / src / core / src / lib / extensions / field-validation / field-validation.spec.ts View on Github external
function buildField({ model, options, form: formControl, ...field }: FormlyFieldConfigCache): FormlyFieldConfigCache {
  const builder = createBuilder({
    extensions: ['core', 'validation'],
    onInit: c =>
      c.addConfig({
        validators: [
          { name: 'required', validation: Validators.required },
          { name: 'asyncRequired', validation: ctrl => of(Validators.required(ctrl)) },
        ],
      }),
  });

  field = { key: 'name', ...field };

  builder.buildField({
    model: model || {},
    options,
    formControl,
github ngx-formly / ngx-formly / src / core / src / lib / extensions / core / core.spec.ts View on Github external
function buildField({ model, options, ...field }: FormlyFieldConfig): FormlyFieldConfigCache {
  const builder = createBuilder({
    extensions: ['core'],
    onInit: c =>
      c.addConfig({
        types: [
          {
            name: 'input',
            wrappers: ['form-field'],
            component: MockComponent({ selector: 'formly-test-cmp' }),
          },
        ],
      }),
  });

  builder.buildField({
    model: model || {},
    options,

@ngx-formly/core

Formly is a dynamic (JSON powered) form library for Angular that bring unmatched maintainability to your application's forms.

MIT
Latest version published 1 month ago

Package Health Score

92 / 100
Full package analysis

Similar packages