Home > Enterprise >  I'm getting "Too much recursion" error in angular
I'm getting "Too much recursion" error in angular

Time:10-18

I am getting "InternalError:too much recursion error" in my angular project. However, I'm unable to find out coz of what I'm getting this error... Is there any way to find out from I'm getting this error... Please help I'm stuck here badly...

PS: There is no code to reproduce since I don't know what is causing the error.

CodePudding user response:

PS: There is no code to reproduce since I don't know what is causing the error.

You obviously have plenty of code. The challenge is to find out which part of your code is causing the "infinite recursion".

SUGGESTIONS:

  1. Comment out parts of your code until you've identified the culprit (or at least identified the module that contains or -invokes - the offending code).

... OR ...

  1. Create a new, small test project. Add code from your "real project" until you successfully reproduce the problem

... OR ...

  1. Set some breakpoints, and single-step through the code. This is straightforward with IDEs like Visual Studio code. It shouldn't take long to find the place where your app fails.

CodePudding user response:

I have got the solution: I was importing the page module recursively. While trying to comment out the sections and going through the code I found out. Thanks for the suggestion :)

  • Related