Question:This is the parent component: I passed all the data from the parentComponent to main-page Component.
Answer:Input variables, event emitters, and RxJS just complicate the problem here. All you need is a simple Angular service.
Here is a stackblitz: https://stackblitz.com/edit/angular-ivy-a6ub1h?file=src/app/app.component.html
Your parent component doesn’t need any typescript, all it needs to do is instantiate the other components via html:
If you have better answer, please add a comment about this, thank you!