I am having a parent component. Let say; Component1. In its html I have added below code.
<div>
<router-outlet></router-outlet>
</div>
<div>
<button>Banner</button>
</div>
I want to pass 'Banner' button click functionality into another component which will be rendering through router-outlet. After fetching button click functionality, I want to open a popup inside that component. In routing module, I have added path like below:
{
path: "parent",
component: Component1,
},
children: [
{
path: 'child',
loadChildren:
() => import('path').then(m => m.Module2)
}]
Inside this Module2 I am having another root component Component2. In its html I have added the listening component selector.
Component2 html:
<app-component3></app-component3>
In Component3 ts file only I want to get Banner clicks functionality. And while listening to that I want to open popup. If anyone could assist, it would be helpful.