Questions tagged [angular-dynamic-components]

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.

203 questions
0
votes
1 answer

not getting values which are added dynamically from the component in angular

I am trying to get the values of dynamically added component on click of save button. Here is get-dynamic-added-component-values ts: postData: any[]=[]; finalObject; saveData(form : NgForm) { this.postData = form.value; let jsonData =…
0
votes
1 answer

How to add generic component in angular 8

in my angular application i am dealing with a lot of component that dynamically rendered in run time, but i must specify the component before compiling to inject it in the run time, is there is away to load component by it's name as string ... say…
0
votes
0 answers

How to set dynamic into view mode on save

I am using angular dynamic form and after filling the form, I would like to set the form into view mode(read-only). html: component: @ViewChild(DynamicFormComponent)…
kittu
  • 6,662
  • 21
  • 91
  • 185
0
votes
1 answer

Best Way To Add Angular Component At RunTime On Click Event

The website I am building has multiple components. On the "Home" page component, when a user clicks a button to add something to the page, I want to append the component of their choice to the "home" component. I have researched and found 3 ways of…
0
votes
1 answer

Load generic angular dynamic component

I am trying to make a dynamic component for the popup to create view and edit page for different content. I have made a popup component in which I want to pass a new component name and title of the page. However, I am not getting new component data…
Mitesh
  • 71
  • 12
0
votes
2 answers

pass Dynamic Html element based on options from parent to child component in Angular?

I want to pass html element from parent to child based on conditions like If user click button in parent child should display button or If user select chckbox then child should display checkbox This is my scenario To solve this I am using…
0
votes
0 answers

Angular: How to dynamically initialise an application component, but from a library?

I'm building an Angular library that generate a form (the form definition is provided by an Angular application). This library has the basic built-in form-field type (text, textare, number, date, ...). But some applications need custom fields that…
Snook
  • 174
  • 10
0
votes
1 answer

prevent angular from recursively loading component

I'm loading component dynamically into dynamic position and since that component is a table row I'm using selector: 'td' because I need to apply colspan to the dynamically add row then load the dynamic component in it. The problem is my component is…
et3rnal
  • 322
  • 4
  • 17
0
votes
0 answers

How to create rich text box, that can replace text with Angular Components

I want to create content editor, similar to facebook "create post" textbox, that is able to replace some tokens (e.g words starting with @ or #) with some angular components. E.g. Hello, @John, would be replaced by Hello,
Liero
  • 25,216
  • 29
  • 151
  • 297
0
votes
1 answer

Angular7 -> Navigate to id="#article-1" in dynamicly loaded HTML

I'm contacting backend which returns full .html file, which has to be displayed in Angular component. When I get the file, it has navigations to anchors, which does not work in Angular7, as it tries to navigate to localhost:4200/#. I want to allow…
0
votes
1 answer

Angular - using how to call function on component created dynamically using ng-dynamic-component

I am using the npm package ng-dynamic-component to create dynamic components. I am in a situation where i want to call a specific function on the dynamically created component using this package. I have experimented with a lot of different ways but…
Diemauerdk
  • 5,238
  • 9
  • 40
  • 56
0
votes
1 answer

Destroy component instance once created from service

I’m creating components dynamic using a service. Component was created, but the ngOnDestroy lifecycle look is not getting called. Below is my service file code. @Injectable() export class CreateComponentService implements OnDestroy { private…
stack s
  • 109
  • 13
0
votes
0 answers

I want to run a moduleType in an ngModuleFactory and bring the name attribute value inside

I want to dynamically process the module It is not only drawing the components in the demoule on the demo, but also drawing the components in the imports I want to do it in ViewChild except for the impont module. I want to open the moduleType in…
김도균
  • 29
  • 3
0
votes
0 answers

New dynamic Angular components are always placed at the top of the container

I am creating dynamic components in the following way
addCategory = (categoryName: string) => { const formRowFactory = this.resolver.resolveComponentFactory(FormRowComponent); const { instance: formRowComponent } =…
0
votes
1 answer

Dynamically load nested components in angular?

I want to organise my all tabs components dynamic components. I am using primg ng for ui tabs. Currently my code is allTabs.component.html Before
Soumya Gangamwar
  • 954
  • 4
  • 16
  • 44