4

The thing with my problem is that I have to load one component of an array dynamically on each step of my stepper on the template.

I followed the Angular guide for loading dynamic components into the template, but for now I am only capable to render all the components from the array into the first step of the stepper, is like the other steps don't have the anchor element or I can't target that anchor element.

I've made a non-functional Stackblitz to present an idea of what I need to achieve. Any clues on how to do it?

https://stackblitz.com/edit/angular-1hulxp

jespinosa
  • 43
  • 1
  • 4

1 Answers1

0

Actually, what you should be looking for is content projection and not dynamic loading of the component.

In the case of dynamic loading, one can load many components at the same place.

But, if I understand your requirement correctly, you wish to load different components at different places, i.e. different sections of the stepper. For this case, you have to use content projection. Content projection was earlier(in angularjs) called transclusion.

Vaishnavi Dongre
  • 241
  • 3
  • 11