1
From a button inside the header component I am calling a modal of Angular Material, in this modal has a button enter, I would need that when clicking this button a component called banner was hidden.
my app.component.html has this structure:
<app-header></app-header>
<app-banner></app-banner>
modal.component.html has this structure:
<p class="title">
Entrar
<span class="close" mat-raised-button (click)="save()"><i class="fas fa-times-circle"></i></span>
</p>
<form class="dialog-enter">
<table>
<tr>
<td colspan="2">
<input type="text" placeholder="E-mail ou número de telefone" />
<p class="alert">Informe um e-mail ou número de telefone válido.</p>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<input type="password" placeholder="Senha" />
<p class="alert">A senha deve ter entre 4 e 60 caracteres.</p>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<button class="enter">Entrar</button>
</td>
</tr>
<tr>
<td class="remember">
<mat-checkbox>Lembrar de mim</mat-checkbox>
</td>
<td class="help">
<a href="javascript:void">Precisa de ajuda?</a>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<p class="title">Novo por aqui?</p>
<button class="buy">Assine agora!</button>
</td>
</tr>
</table>
</form>
This is the project link: https://stackblitz.com/edit/angular-ewo6xo
Could someone please help me?
you can use a property-based ngIf.
– Eduardo Vargas
Can you give me an example please?
– Munir Baarini
Is there a link I can see?
– Munir Baarini
If you want to hide it you can use jquery to add display:None to the style in the button click event
– Paulo Ricardo