{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Tips","type":"basic","slug":"tips","excerpt":"Some things you should probably do...","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Production\"\n}\n[/block]\n#api-check\n\nThe apiCheck.js library [recommends](https://github.com/kentcdodds/apiCheck.js#disable-apicheck) 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var apiCheck = require('api-check');\\napiCheck.globalConfig.disabled = true;\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nDoing this will maintain all the APIs (so nothing breaks that depends on apiCheck) but they will all ultimately result in a no-op.\n\n# disableWarnings\n\nangular-formly has a few places that it gives warnings to you in the console. You probably don't want these in production.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"angular.module('yourModule').config(\\n  function(formlyConfigProvider, formlyApiCheck, onProd) {\\n    formlyConfig.disableWarnings = onProd;\\n  }\\n);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"General\"\n}\n[/block]\nTake a look at the section about `extras` in the [formlyConfig](doc: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](https://code.google.com/p/chromium/issues/detail?id=468153#c14) for more info). You do so like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"angular.module('yourModule').config(function(formlyConfigProvider) {\\n    formlyConfig.extras.removeChromeAutoComplete = true;\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","updates":["556314fc22ce3921003a8dd8","55675d25f15ecb23004bc8cf"],"order":11,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"558cb2bd0b236c2500d37cfa","githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":["558cb2bd0b236c2500d37cf0","558cb2bd0b236c2500d37cf1","558cb2bd0b236c2500d37cf2","558cb2bd0b236c2500d37cf3","558cb2bd0b236c2500d37cf4","558cb2bd0b236c2500d37cf5","558cb2bd0b236c2500d37cf6","558cb2bd0b236c2500d37cf7","558cb2bd0b236c2500d37cf8","558cb2bd0b236c2500d37cf9","558cb2bd0b236c2500d37cfa","558cb2bd0b236c2500d37cfb","558cb2bd0b236c2500d37cfc","558cb2bd0b236c2500d37cfd"],"title":"Guides","slug":"guides","order":0,"from_sync":false,"reference":false,"_id":"558cb2bc0b236c2500d37cd5","__v":1,"version":"558cb2bc0b236c2500d37cd4","createdAt":"2015-03-27T20:15:06.295Z","project":"5515ba4981faf83900d2b10c"},"createdAt":"2015-04-10T17:49:41.158Z","__v":0,"project":"5515ba4981faf83900d2b10c","version":{"version":"6.16.0","version_clean":"6.16.0","codename":"","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["558cb2bc0b236c2500d37cd5","558cb2bc0b236c2500d37cd6","558cb2bc0b236c2500d37cd7","558cb2bc0b236c2500d37cd8","558cb2bc0b236c2500d37cd9","558cb2bc0b236c2500d37cda"],"_id":"558cb2bc0b236c2500d37cd4","project":"5515ba4981faf83900d2b10c","releaseDate":"2015-06-26T02:02:36.211Z","__v":1,"createdAt":"2015-06-26T02:02:36.211Z","forked_from":"558a9c9f8d30cb2300873ecd"},"user":"54e3723b8ef7552300409bf4"}

Tips

Some things you should probably do...

[block:api-header] { "type": "basic", "title": "Production" } [/block] #api-check The apiCheck.js library [recommends](https://github.com/kentcdodds/apiCheck.js#disable-apicheck) 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: [block:code] { "codes": [ { "code": "var apiCheck = require('api-check');\napiCheck.globalConfig.disabled = true;", "language": "javascript" } ] } [/block] 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. [block:code] { "codes": [ { "code": "angular.module('yourModule').config(\n function(formlyConfigProvider, formlyApiCheck, onProd) {\n formlyConfig.disableWarnings = onProd;\n }\n);", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "General" } [/block] Take a look at the section about `extras` in the [formlyConfig](doc: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](https://code.google.com/p/chromium/issues/detail?id=468153#c14) for more info). You do so like this: [block:code] { "codes": [ { "code": "angular.module('yourModule').config(function(formlyConfigProvider) {\n formlyConfig.extras.removeChromeAutoComplete = true;\n});", "language": "javascript" } ] } [/block]