Questions about Angular Dynamic Components, an Angular technique for creating components during runtime. Use this tag for questions which are not specific to an individual version of Angular.
Questions tagged [angular-dynamic-components]
203 questions
-1
votes
1 answer
Angular - A function defined in one component, that generates dynamic child components can’t be called in a separate non related component
Update to this in this new question.
I have followed this guide which I found by finding this question but then being pointed to this question as a fix for some of the issues that occurred in the prior question. The first link code example allows me…

SneakyShrike
- 723
- 1
- 10
- 31
-1
votes
1 answer
How to get Child Components from ViewContainerRef - Angular 9?
I added dynamic components (ChildComponent.ts) inside viewContainerRef. I able to get child count from viewContainerRef like this viewContainerRef.length if i use index to get Child Component (viewContainerRef.get(0)) it's return ViewRef But i need…

Sabish.M
- 2,022
- 16
- 34
-1
votes
1 answer
Angular - change detection in dynamically loaded module/component without using `ChangeDetectorRef`
I compile an Angular module (to load the module dynamically) with compiler's compileModuleAsync and want to insert a component of the module into view.
I tried to insert the component into ViewContainer but the component doesn't detect changes…

critrange
- 5,652
- 2
- 16
- 47
-1
votes
1 answer
In Angular 8, how do I pass a component into another component's input and then use it imperatively in a router module
I have already looked at the following two threads that were about using a component passed in declaratively (1, 2, contentChildren, ng-content) in the template, I am asking how one could pass in a component and use it imperatively (in a routing…

imnickvaughn
- 2,774
- 9
- 25
- 42
-1
votes
2 answers
Angular component in NgbModal cannot use @viewchild to access methods inside
Im having the following problem, i think its a common case but i havent been able to solve it.
I have a small error alert component, which has a method inside to show an error.
The way im using it in route components is i use the @viewChild query to…

Toddy
- 333
- 1
- 15
-2
votes
1 answer
Is there a way to pass data between two same level component in Angular using @Input?
Folder structure of the project (for reference)
dynamic-container.component.html
Dynamic component in angular
- Mobile
-2
votes
1 answer
Best way to dynamically add elements in Angular side by side
I am creating an app which has an API that returns different number of objects in an array depending on the variable that I send him. Depending on how many objects are returned I want to draw that many circles side by side in a row, max 10 circles…

OmarLittle
- 423
- 1
- 9
- 18
-2
votes
1 answer
ng2 charts on Angular 9 not responsive
I created a dashboard application using Angular9 and ng2 charts. The application has ability to drag and drop charts on a Gridster layout and create Dashboards which loads in the Home page.
ng2 charts are set responsive true through chart options,…

Sree Ja
- 1
- 1