Hello,
the issue I'm experiencing with the dialog is as follows:
I have an ejs-dialog with a set of two simple buttones and a ng-template block as content.:
<ejs-dialog... >
<e-buttons>
<e-dialogbutton [buttonModel]='dlgButtons[0]' (click)="dlgAddBtnClick($event)"></e-dialogbutton>
<e-dialogbutton [buttonModel]='dlgButtons[1]' (click)="dlgCancelBtnClick($event)"></e-dialogbutton>
</e-buttons>
<ng-template #content>...<ng-template #content>
The button model array is:
public dlgButtons: ButtonModel[] = [
{ content: 'Apply Changes', isPrimary: true, disabled: !this.isReady },
{ content: 'Cancel', cssClass: 'e-flat' }
];
And I can see both buttons rendered as expected with the corresponding labels, but both click event methods don't work.
.
If I set both buttons with the [buttons] property of the dialog component using the following object as property, then click on buttons work.
public dlgButtons: ButtonPropsModel[] = [
{ click: this.dlgAddBtnClick.bind(this), buttonModel: { content: 'Apply Changes', isPrimary: true } },
{ click: this.dlgCancelBtnClick.bind(this), buttonModel: { content: 'Cancel', cssClass: 'e-flat' } }
];
I read a similar issue in Blazor, but in that case it was by using a footer template, which differs from this case.
Could you advise please?
Thank you.