pushp
pushp

Reputation: 2504

RangeError: Maximum call stack size exceeded in angular2

I am using angular2 with typescript in Visual Studio 2015.I am getting exception RangeError: Maximum call stack size exceeded in angular2

Why i am getting this exception and how can i solve this.

Upvotes: 1

Views: 7301

Answers (2)

Gabboucher
Gabboucher

Reputation: 43

I had the same problem. I found out that in my component.html, I was calling the same selector that call my component.html, hence recursivity.

Upvotes: 1

Crob
Crob

Reputation: 617

Might not have been your issue, but worth mentioning. I was getting the same error with RC5. It took a bit before I realized that it stopped when I commented out one of my modules with the selector "footer". Well my footer.component.html template file of course uses the HTML5 <footer> tag. So because my selector was an HTML tag it was in infinite recursion. Seems obvious to think about now, but caused me some issues.

Upvotes: 13

Related Questions