Skip to main content
2 votes
1 answer
45 views

Angular dynamic questions causing infinite re-renders

I am trying to generate dynamic forms based on a set of questions I receive from an API. When the app inits I will dispatch a state action that will call the mock API to get the questions and then the ...
Sam Redmond's user avatar
0 votes
0 answers
46 views

Tracking when dynamic structure of components is fully rendered in Angular

I have a nested structure of components in form of JSON that I get from an API. componentStructure$ = apiCall(); The JSON looks like this: structure = { component, innerComponents: [{ ...
Raziel's user avatar
  • 140
1 vote
1 answer
93 views

`this` not set to component instance when creating component programatically

I have a directive that reads src attribute and appends a DynamicComponent. It also sets an input property of DynamicComponent. @Directive({ selector: '[appDynamic]' }) export class InjectDirective {...
sanjihan's user avatar
  • 6,138
4 votes
2 answers
380 views

How to use formControlName (ng_value_accessor) with ngComponentOutlet in Angular for dynamic form components

I'm working on a dynamic form in Angular where I need to use ngComponentOutlet to dynamically load different components based on the field type. However, I'm struggling to bind formControlName to ...
Lebanta's user avatar
  • 53
1 vote
1 answer
64 views

Access child component from dynamically created component - Angular 12

Inside global-component I have method for dynamically creating component const comFactory = this.resolver.resolveComponentFactory(ParentComponent); const component: any = this.componentContainer....
Sara's user avatar
  • 751
1 vote
1 answer
80 views

Is there a way to bind event in dynamically rendered components in angular using templates?

I am using below code to render my components dynamically - @for(item of list(); track $index){ <!-- dynamic rendering using ng-container --> <ng-container *ngComponentOutlet=&...
Prafull Dhadkar's user avatar
1 vote
0 answers
71 views

Using Injector.create() to dynamically create injector for embedded view is not working when parent injector is provided via parent property

I want to dynamically create the injector for embeddedView and for that purpose I use Injector.create() method: const myInjector = Injector.create({ providers: [ { ...
Raziel's user avatar
  • 140
0 votes
1 answer
101 views

How can I project dynamic filter chips using `ng-template`, `ngTemplateOutlet`, and `ng-content` in Angular?

I'm working on an Angular application where I need to build a reusable filter bar component that displays dynamic filter chips based on user selections. The filter chips need to be projected into the ...
Eternal Sunshine's user avatar
1 vote
1 answer
44 views

Override ngComponentTemplate from root component

I am trying to wrap my head around the following issue. In the root-level app.component you have the following structure: <div class="container"> <sidebar /> <menu-bar /&...
Link's user avatar
  • 1,741
1 vote
1 answer
221 views

Deprecated ComponentFactoryResolver, Trying to use ViewContainerRef

I am trying to setup my auth.component.ts file to use ViewContainerRef from the placeholder.directive.ts file, but I am unsure what I need to populate inside the createComponent() at the end of the ...
Miles Winokur's user avatar
2 votes
1 answer
100 views

Dynamically loading and rendering External files as component in angular

I have a use-case, where I should render an external angular component or web-component in an angular application. I have created a sample application (stackblitz) to reproduce the scenario and below ...
jayalakshmi.k's user avatar
1 vote
0 answers
244 views

How to dynamically create and manage multiple popup dialogs in Angular?

I am working on an Angular(17.x) project where I need to create and manage multiple popup dialogs dynamically. I aim to avoid manually creating separate components, inputs, and outputs for each popup. ...
buddhi chamalka's user avatar
0 votes
1 answer
61 views

Dynamically injected component's data is not being displayed in main component in Angular

I am currently trying to display a component's html view in another component in a chatbot setting. Let's call them chat component and component 2. So basically chat component which renders the main ...
Charan Segaran's user avatar
1 vote
1 answer
111 views

Angular Material Table filtering of dynamic components

I often use components to display cell data in an Angular Material Table, including dynamic components created with ngComponentOutlet. When filtering those tables, I can't seem to properly filter ...
DeuceyPoo's Dad's user avatar
2 votes
2 answers
452 views

Angular directive @Input ignored when added to component via directive composition

I think I'm missing something very basic here, but I've been staring at this for too long. According the docs and everything else I've seen, an Angular directive's @Input() will be accessible on a ...
Brian's user avatar
  • 1,449

15 30 50 per page
1
2 3 4 5
15