Guides
GuidesExamplesGitterLog In
Guides

Tips

Some things you should probably do...

Production

Example: http://angular-formly.com/#/example/other/production-tips

api-check

The apiCheck.js library recommends that you disable it in production. To squeeze out the most of performance, you'll want to do this ASAP in your app (before even angular-formly is loaded). Depending on how you manage dependencies, you'll simply need to get hold of the apiCheck factory and disable it. Something like this should do the trick:

var apiCheck = require('api-check');
apiCheck.globalConfig.disabled = true;

Doing this will maintain all the APIs (so nothing breaks that depends on apiCheck) but they will all ultimately result in a no-op.

disableWarnings

angular-formly has a few places that it gives warnings to you in the console. You probably don't want these in production.

angular.module('yourModule').config(
  function(formlyConfigProvider, formlyApiCheck, onProd) {
    formlyConfigProvider.disableWarnings = onProd;
  }
);

General

Take a look at the section about extras in the formlyConfig. There are a few extras you may want to consider turning on. One that you will likely really want to turn on is the removeChromeAutoComplete (see this for more info). Another is explicitAsync which is only present during the deprecation period of validators that can return a promise. See #369 for more info.

Here's an example:

angular.module('yourModule').config(function(formlyConfigProvider) {
  formlyConfigProvider.extras.removeChromeAutoComplete = true;
  formlyConfigProvider.extras.explicitAsync = true;
});

Blog Articles

There have been several blog articles about angular-formly. If you write one, please hit the "edit" button at the top of this page and add yours!