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
0
votes
1 answer
Angular Dynamic forms with api data
Do we have any best examples to create a dynamic forms from the data ? Which input fileds always dynamic. The use case I'm looking for is I have api which is having set of records which always not really consist means today if have 20 record tomrrow…

vijay munnangi
- 43
- 1
- 4
- 13
0
votes
1 answer
Tooltip as dynamic component
I want to add tooltip to the svg element, but as a component created dynamically. I add the tooltip to the element, using TooltipDirective on svg element i.e.
chartElement…

Gitnik
- 564
- 7
- 26
0
votes
1 answer
How to provide Inputs and Output for dynamic components
I ran into ng-dynamic-component package, while struggling with Angular's ngComponentOutlet unacheiveable @Inputs and @Outputs interactions.
In my application, I'd like to dynamically instantiate different types of tab components in *ngFor.
Reading…

Kesem David
- 2,135
- 3
- 27
- 46
0
votes
1 answer
transform HTML string to Angular Components
let's say we do an API call and get some HTML DOM in a String. The content comes as HTML without angular, so I have first to transform it to Angular where I want and then compile it as angular.
Example API response:
...some more html...
a…

Ignacio Bustos
- 1,415
- 2
- 17
- 26
0
votes
1 answer
Angular Catching events emitted by dynamically created objects
I have a component generator which is used to generate components on the fly and render them within its template. Any events emitted by a component needs to be caught by the component generator, data needs to be processed and processed data needs to…

alevi.dcosta
- 143
- 2
- 12
0
votes
1 answer
Dynamic component loading using Parent Class
I am trying to create a generic code for dynamic component loading.
I have implemented parent child relationship. In it, child is overriding parent and will be used to dynamically load components.Below is the link I followed -
dynamic component…

Narendra Pandey
- 514
- 4
- 11
- 26
0
votes
0 answers
Angular 6 dynamic components
I am working on a project where I need to create the component dynamically and add them to a tab, but initially I created a small project with two components and I want to load those two components dynamically inside a div
App.module.ts
import {…

Mhand7
- 527
- 1
- 3
- 21
0
votes
1 answer
Access an instance of a component and change its value in angular 6

vimalkovath
- 3
- 3
0
votes
1 answer
Dynamic Angular component
I have a requirement to add a dynamic component to the Angular application. The idea is to bundle the component in one JavaScript file which will be downloaded on some condition.
The whole idea is to ship independent components(features) as and…

Abhishek
- 621
- 1
- 8
- 19
0
votes
0 answers
Dynamically Loading Components in Angular
I'm currently working on an application, which displays a table using angular mat table. I want the content of each cells to be dynamically added. So in my html code I added an anchor element in the cell area. Generally, I have been following the…

Link1510
- 101
- 1
- 8
0
votes
0 answers
How can we add component dynamically from outside app in Angular 6?
I have a JSON file outside of my Angular6 app,I want to read that JSON file and attach component in my application at runtime.
Like I am getting
response:[{html:" ",component:"
import { Component, OnInit }…

Mohit Sharma
- 21
- 2
0
votes
2 answers
Angular: How to use shared modules in a Dynamic Component?
I'm creating dynamic component in Angular v6 using compileModuleAndAllComponentsAsync of angular compiler with same below code.
viewChangeMethod(view: string) {
let template = `${view} `;
const tmpCmp = Component({ template:…

DigguDg
- 19
- 1
- 10
0
votes
0 answers
I'd like to create completely dynamic pages from JSON in Angular 6
I'd like to create an app made of completely dynamic pages configured by JSON.
I chose ngx-formly for creating dynamic forms, it works nicely, but I could not figure out how to make a step forward and create the screens dynamically, while being able…

hans
- 1
-1
votes
0 answers
Angular dynamic component (standalone) and material module imports not found
I'm playing with dynamic components and i'm not able to use components from material modules, inside the dynamic component template.
It seems that imports ,of the standalone dynamic component, like MatIconModule aren't imported and the error is:…

hal9000
- 1
- 1
-1
votes
1 answer
Access dynamically loaded child component instance
@ViewChild(ComponentType) comp!: ComponentType;
ngAfterViewInit() {
console.log('ComponentType instance', comp);
}
To get hold of a child component's instance, I know that ViewChild can be used as shown above. It works for statically added…

karthikaruna
- 3,042
- 7
- 26
- 37