I'm having this problem when I try to use a igx-grid, all other components work fine.
Versions: package.json
Log in browser console:
zone-evergreen.js:797 Uncaught Error: Uncaught (in promise): TypeError: Cannot read property 'detach' of undefinedTypeError: Cannot read property 'detach' of undefined at new igniteui_angular_IgxGridBaseDirective (igniteui-angular.js:53832) at new igniteui_angular_IgxGridComponent (igniteui-angular.js:61347) at createClass (core.js:31985) at createDirectiveInstance (core.js:31807) at createViewNodes (core.js:44210) at callViewAction (core.js:44660) at execComponentViewsAction (core.js:44565) at createViewNodes (core.js:44239) at createRootView (core.js:44082) at callWithDebugContext (core.js:45632) at resolvePromise (zone-evergreen.js:797) at resolvePromise (zone-evergreen.js:754) at zone-evergreen.js:858 at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:39680) at ZoneDelegate.invokeTask (zone-evergreen.js:390) at Zone.runTask (zone-evergreen.js:168) at drainMicroTaskQueue (zone-evergreen.js:559)
Hi Miguel,
I am glad that you find my suggestion helpful.
After further investigation, the issue appears to be related to how the project is built. When JIT compilation is used, in order igxGrid to work, the ES5 standard has to be used. I am currently investigating why exactly this is happening. Note that you can use the AOT compilation with ES2015 standard if you want:
"qual35": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.qual35.ts" } ], "optimization": true, "aot": true }
Hi Martin,
You are the best, problem solved.Just added to each environment the TsConfig entry and the Grids are working.
Can you explain why the other components work perfectly and the Grid is the only that has problems?
Best regards,
Miguel Domingues
I have reproduced your issue and after further investigation, I believe I have found that the root cause for this behavior. When serving the application the default ts.config is used. By adding tsconfig-es5.app.json, in your configuration for qual35 inside the angular.js file, the issue is resolved on my side:
Please test this on your side and let me know if you need any further assistance with this matter.
I now can replicate the problem and you have a way to replicate it also.
Instead of ng serve, please start the application with npm run start35.
Inside package.json :
When I don't change the environment value running the ngserve, all works fine.
Can you please look at it ?
I already tested with a colleague with on a fresh installed environment and it worked.I am doing a full reset on my environment to have the same result.
I am suspecting on having a angular cli 8.2.X and with the 9.0 it works....so maybe cli incompatibility with the most recent igx-grid component or just other kind of incompatiblity between dependencies.
As soon as I solve the problem, I will notify you because this can help other people with similar problem.
Thanks for all the help.