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,
The version I use is @angular/cli 8.3.25.
When I visit the /grid1 route, an empty igxGrid with loading indicator at first is displayed. In the console only the errors related to the backend API are printed.
Please let me know of the result of running the project on a different machine and when you are ready with the screencast.
Hi Martin,
Once again thank you for your quick response.I will ask a colleague to execute the same process you did.Here I still get the problem I mentioned, even after clearing the node_modules folder and going to an older version of ignite-ui.
Can you tell me what version of angular-cli are you using?Tomorrow I will make a screencast with the problem and try to reproduce the problem on other computer.If possible over the root path call /grid1 please.
Best regards,
Miguel Domingues
I have run your sample from the second link without any modifications(I only installed the node packages) and in the root page, igxGrid renders without the errors you have mentioned.
I have attached a screencast for your reference.
To able to help you I will need a sample that reproduces your issue. If however, the same sample works on my side and not on yours, it could be an issue with your development environment.
Sorry for the delay again.The problem it's not in the router, I created an example where you can see the error clearly.If possible go to this github repo and download the zip with the project and just access the root of the project you will see a blank screen and in the browser console the error:
EDIT:
For what I could see it seems the cdr (ChangeDetectorRef) is undefined.
Uncaught Error: Uncaught (in promise): TypeError: Cannot read property 'detach' of undefined TypeError: Cannot read property 'detach' of undefined at new igniteui_angular_IgxGridBaseDirective (igniteui-angular.js:53832) at new igniteui_angular_IgxGridComponent (igniteui-angular.js:61347)
GitHub: https://github.com/MiguelPetrotec/ShareRepoFIle: IgniteUi-Angular-base.7zThanks in advance.
I managed to download your project and run it. I noticed that submodule routing is used. In that case, inside the layout component, the nested router outlet has to be named:
<router-outlet name='sub'></router-outlet>
After this change on my side the igxGrid is displayed. Please test it on your side and let me know how it behaves.