Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise
See original GitHub issueI have imported FormBuilder in Angular 4 project and using as a wrapper. I’m able to generate the form template, but the having issue with trying to render the form. Adding https://formbuilder.online/assets/js/form-render.min.js to angular-cli throws following error.
VM405:6 Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise
(window|global).Promise has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.) at Function.Zone.assertZonePatched (zone.js:39) [<root>] at new NgZone (core.es5.js:3973) [<root>] at PlatformRef_._bootstrapModuleFactoryWithZone (core.es5.js:4767) [<root>] at :4200/vendor.bundle.js:5417:59 [<root>] at eval (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:142326) [<root>] at eval (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:142435) [<root>] at MutationObserver.s (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:81210) [<root>] at Zone.runGuarded (zone.js:138) [<root> => <root>] at MutationObserver.<anonymous> (zone.js:116) [<root>]
Code
ngAfterViewInit() { const formData = this.template; const formRenderOpts = { formData, dataType: 'json' }; const fbEditor = document.getElementById('emp-form'); this.form = $(fbEditor).formRender(formRenderOpts); }
Thanks in advance, Aniket
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
by the way, in the website https://formbuilder.readthedocs.io/en/latest/getting-started/
please update the document
to use https since chrome and other browsers didn’t allow mixed content if you are trying to load http and https
oh good, thanks for letting me know. i’ll change it now.