I'm looking for help about style components parent/child with Angular.
On an Angular page I have a popup. I need to change the CSS of the page when the popup is open.
This is a schema of the page structure:
You can see
- The parent page with another component for the menu.
The popin is defined with 2 component:
- for the structure of layout and base popup
- for the content (we have lots of popins)
When a popin content is open I need to change the component Menu style and the popin structure style for change the position of the popin in the page.
How can I achieve that?
This is a sample of my popup route (the path animation is my popup):
{
path: 'account',
component: AccountComponent,
canActivate: [AuthGuard, AccountGuard],
children: [
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
{path: 'dashboard', component: DashboardComponent, children: [
{path: 'animation', component: BaseAnimationTemplateComponent , children: [
{path: 'menu', component: AnimationAccountMenuComponent},
]}
]},
]
},