I am trying to test method call when certain button is clicked, nothing seems to work.
This is the line in my HTML file:
<button class="btn-grey" (click)="methodTest()">ODUSTANI</button>
And method in my component:
export class MyComponent {
constructor (public dialog: Matdialog) {}
methodTest(): void {
this.dialog.open(
myOtherComponent,
{disableClose: true, data:{title: someTitle, message: someMessage}
);
}
}
}in your method.