I have an Angular 6 app using angular material, on which I have a mat-menu containing a component (app-login):
<button [matMenuTriggerFor]="menu" mat-icon-button>
<mat-icon>person</mat-icon>
</button>
<div MatMenuPanel>
<mat-menu #menu="matMenu" [overlapTrigger]="false">
<ng-template matMenuContent>
<app-login></app-login>
</ng-template>
</mat-menu>
</div>
The issue is that if I click several times on the trigger button, app-login is being rendered/appended several times, so I end up with a menu with app-login repeated several times.