Closed ChrTall closed 5 months ago
Can you give an online example? I want to know how you use it.
@nzbin Hi! Is this issue closed since it's fixed or not?
I faced the same issue by combining the [disabled]="formGroup.invalid"
and [loading]="isLoadingSave"
<button
type="button"
mat-flat-button
[disabled]="myForm.invalid"
[loading]="isLoadingSave"
color="primary"
(click)="saveForm()">
{{ t('BUTTONS.save') }}
</button>
On saveForm
, the flag isLoadingSave is set to false when an API completes and also the form is reset to its initial state.
If I remove the loading attribute, the button correctly disable, but with disabled and loading together not.
Lib version used: 16.1.3
I would like to use the
[loading]
directive, while the api loads data, for a button. This works like described in the docs, but I have the problem that I also want to conditionally set the[disabled]
directive on the button, which seems to have no effect. The button is used with the[matMenuTriggerFor]
directive to display a MatMenu.