Reputation: 569
I have 2 modules in angular 11
and declare some component as widget component in these modules that used in each other
now want to use CustomerBlockInfoWidget in AccountingModule and AccountingBalanceWidget in CustomerModule
and finally, I have the infinity load and get Maximum call stack size exceeded error
now how I can use these widgets that fix the infinity load
Upvotes: 6
Views: 25368
Reputation: 21
In may case, I accidentally included my component to import instead of export. the commented part was causing the problem.
Upvotes: 2
Reputation: 14792
Please make sure that you did not add any components, directives, and pipes in the import array of modules.
You can add standalone components, directives, and pipes in the import array of the module.
Upvotes: 10
Reputation: 4993
Maximum call stack size exceeded
error is always a symptom of an infinite loop. The provided information doesn't point to a possible place in the code that triggers it.
It might be a simple loop with no chance for an exit or a more complex scenario like Function A calls Function B which calls Function C which calls Function A and here it goes again.
If you have a call stack of the error, reading it should be enough to notice this infinite execution.
Upvotes: 8