0

I have a long html file so I just divide it to some components and then in the app.component.html I insert their selector. I just found that if I enter more than 2 selector it shows me the error

NodeInvocationException: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded

that's my app.component.html - when I run it show me the error

<header></header>
 <navbar></navbar>
<router-outlet></router-outlet>
<footer></footer>

do you see any error in these files together?

header.component.html -> the header selector

<header class="masthead signature-dierk">
    <div class="container-fluid">
        <div class="row">
            <article class="col-md-6">
            </article>
            <article class="col-md-6">
            </article>
        </div>
    </div>
</header>

stack trace

    An unhandled exception occurred while processing the request.

NodeInvocationException: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at Object.exports.createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\main-server.js:17873:23)
at Parse5DomAdapter.createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\main-server.js:4010:28)
at EmulatedEncapsulationServerRenderer2.DefaultServerRenderer2.createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\main-server.js:4937:51)
at EmulatedEncapsulationServerRenderer2.createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\main-server.js:5157:66)
at BaseAnimationRenderer.createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\main-server.js:15768:30)
at createElement (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\vendor.js:20116:27)
at createViewNodes (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\vendor.js:23093:44)
at callViewAction (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\vendor.js:23573:13)
at execComponentViewsAction (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\vendor.js:23482:13)
at createViewNodes (E:\פרוייקטים\פרוייקטים קיץ\Asp.net\Baber_App\Baber_App\ClientApp\dist\vendor.js:23154:5)
Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance+<InvokeExportAsync>d__7.MoveNext()
12
  • There is nothing in the code you provided that will let us know the answer. At least give the error stack trace. Commented Aug 17, 2017 at 21:41
  • I updated my post, you can see please. Commented Aug 17, 2017 at 21:50
  • What is main-server.js ? Commented Aug 17, 2017 at 21:53
  • it's file that create when i open angular 4 project with asp.net Commented Aug 17, 2017 at 21:56
  • 1
    @AdirZoari fyi header is an html5 tag and shouldn't be used as selector for any component. I'm not sure that'd cause any issue though. I'd suggest using dashes in your components. app-header. Further more it's confusing for us to read and is bad practice. Further Further more the error doesn't originate from plain html unless you have some circular dependency going on (header in navbar and navbar in header). The error most likely comes from actual js (/ts) code. Commented Aug 17, 2017 at 22:11

2 Answers 2

1

header is an html5 tag and shouldn't be used as selector for any component. I'd suggest using dashes in your components like app-header.

Sign up to request clarification or add additional context in comments.

Comments

0

the solution is to change the header selector to app-header so it will be

<app-header></app-header>

Don't forget to change also in header.component.ts in the selector

    selector: 'app-header',

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.