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

Creating a component directly using ViewContainerRef.createComponent or using a component directly in a template without any parameters will result in the error #1914

Open
eric-gitta-moore opened this issue Nov 19, 2023 · 0 comments
Labels

Comments

@eric-gitta-moore
Copy link

eric-gitta-moore commented Nov 19, 2023

Describe the bug
Creating a component directly using ViewContainerRef.createComponent or using a component directly in a template without any parameters will result in the error

To Reproduce

// ...
ngAfterViewInit(): void {
    setTimeout(() => {
      const ref = this.container.createComponent(BarVerticalComponent);
      ref.instance.view = [700, 300];
      ref.instance.results = this.data;
    });
  }
// ...

or

<!-- But if you add any of the input attributes, you won't have a problem -->
<ngx-charts-bar-vertical></ngx-charts-bar-vertical>

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Demo
https://stackblitz.com/edit/vertical-bar-chart-i1i4qy?file=app%2Fapp.component.html

https://vertical-bar-chart-i1i4qy.stackblitz.io/

ngx-charts version
20.5.0

@eric-gitta-moore eric-gitta-moore changed the title Using ViewContainerRef. CreateComponent or directly in the template without error creating ChartComponent appear refs Creating a component directly using ViewContainerRef.createComponent or using a component directly in a template without any parameters will result in the error Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant