Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using custom element inside ng-template of another custom element throws an error #114

Open
apoorvalele opened this issue Mar 10, 2022 · 0 comments

Comments

@apoorvalele
Copy link

I have used a login custom element inside a shell app.

<lazy-login *axLazyElement="'http://localhost:3000/lazy-login/main.js'"></lazy-login>

This is the login.component.html file. I have used another lazy loaded element lazy-card.

<lazy-card *axLazyElement="'http://localhost:3000/rds-card/main.js'" [header]="header" [body]="body" [footer]="footer">
  <ng-template #header>
    <div>Header</div>
  </ng-template>
  <ng-template #body>
    <div>Body</div>
   <button>Hello</button>
    <lazy-button *axLazyElement="'http://localhost:3000/lazy-button/main.js'" label="Sample button"></lazy-button>
  </ng-template>
  <ng-template #footer>
    <div>Footer</div>
  </ng-template>
</lazy-card>

The body template of lazy-card has a lazy-button custom element. I am getting an error when rendering the lazy-button element. If i remove the lazy-button custom element from the body template, all the ng-templates get rendered properly.

Here is the error thrown in the console.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant