I'm a little new to the angular 2 world, so please excuse me if this is a naive question.
I want to read a json file containing meta for various components that I need to display for the page.
I need to read this json and display the child components in the order in which they are listed here.
I have successfully used the dynamic component loader API, which angular 2 provides for dynamic loading of child components inside a for loop. However, there are other requirements that make using this API a bit complicated.
So I'm looking for another way to do the same. It will be like manipulating the DOM from the ts file of the parent component to get the child components in the same order as in JSON.
Any conclusions would be very helpful. Many thanks!
PS: sorry you did not publish the code. I wrote this using a mobile phone.
source
share