on the following picture you can see my problem. When i click on the letters of the Edit button i get redirected to the page, otherwise if i click the button but not the letters, it wont do anything. enter image description here
this is the code:
`<ng-template #ownerTemplate>
<button class="edit-btn" mat-raised-button><a routerLink="edit">Edit</a></button>
<button mat-raised-button (click)="deleteMovie(this.movie!._id)">
Delete
</button>
</ng-template>`
How can i fix it?
>Solution :
Try putting the routerLink="edit" inside the button and not inside
Like this :
<button class="edit-btn" mat-raised-button routerLink="edit"><a>Edit</a></button>
<button mat-raised-button >
Delete
</button>
You can also remove the <a> if you dont use it