formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.23k stars 405 forks source link

Disabling API check without require.js #627

Closed theotherp closed 8 years ago

theotherp commented 8 years ago

All examples and instructions I can find on disabling API check require requireJS. How do I disable it without? Thanks.

kentcdodds commented 8 years ago

If you're simply using the global, then rather than requiring it, it's available as a global apiCheck. Then you disable it the same as in the docs.

theotherp commented 8 years ago

Uhm, I just realized I might've misunderstood something. I read the tips and they said to disable apiCheck.js in production. But I don't even use any custom API checks, so disabling it probably wouldn't do anything, right?

kentcdodds commented 8 years ago

No, angular-formly uses it heavily. You definitely want to disable it for production. There's an example on the website for production tips that uses globals.

I'm going to let you look at that and consider this issue closed. Check out the chat for more questions.

gatspy commented 7 years ago

api-check.js after loading is complete, use apiCheck.globalConfig.disabled=true. formly version:8.4.0