I need to show/hide menu icon in menu.components by app.component
So my menu html component code:
<div class="menu-top" (click)="emitOpenMenu()"><!-- (click)="openMenu()" -->
<div class="hamburgher-content">
<i class="fas fa-bars"></i>
</div>
<div>
<i class="icon icon-sv-logo"></i>
</div>
<div>
<i class="fas fa-bell" hidden="true" [routerLink]="'notifications'"></i>
</div>
</div>
My app.component code:
if (scanData === null) {
menu hide
// run code for hide menu icon here in menu compoonent
} else {
menu show
// run code for show menu icon here in menu component
}
app.component html (parent)
<mat-sidenav-content>
<div #target></div>
<div *ngIf="showMenuBool">
<sv-menu (openMenuOutput)="openMenu()"></sv-menu>
</div>
<div style="margin-top:60px;">
<div class="fab-scan" *ngIf="showFab">
<button mat-fab color="primary" (click)="openScanDialog()"><i class="fas fa-barcode"></i></button>
</div>
<div class="fab-up" *ngIf="showUp">
<button mat-fab color="primary" (click)="gotoTop(target)"><i class="fas fa-arrow-up"></i></button>
</div>
<router-outlet (activate)="RoutesChanged()"></router-outlet>
</div>
</mat-sidenav-content>
there is a way to get class by dom with angular ? I'm new about angular 7, thanks