Skip to content

Latest commit

 

History

History
93 lines (46 loc) · 1.81 KB

api.md

File metadata and controls

93 lines (46 loc) · 1.81 KB

wieldo:angular-formly-transformer Public API

Automate configuration of fields in Angular-Formly

API documentation automatically generated by docmeteor.


File: "lib/client/formly-transformer.js" Where: {client}


formlyTransformer   Client


AngularJS Service

formlyTransformer.register(transformer)  Client


Register transformer

This method register is defined in formlyTransformer

Arguments

  • transformer {function}

modification function (see formlyConfig.extras.fieldTransform)

formlyTransformer.run(fields, model, formOptions, form)  Client


Runs all registered transformers and returns the modified fields array.
You can use it manually and with custom arguments but it is being triggered automatically by angular-formly module

Arguments

  • fields {array}

see formlyConfig.extras.fieldTransform

  • model {object}

see formlyConfig.extras.fieldTransform

  • form {object}

see formlyConfig.extras.fieldTransform

  • formOptions {object}

see formlyConfig.extras.fieldTransform

Returns {array}

formlyTransformer.createError(msg)  Client


Create Error object with prefixed message

This method createError is defined in formlyTransformer

Arguments

  • msg {string}

error message

Returns {Error}