ng-wizard
ng-wizard copied to clipboard
toolbarExtraButtons Disabled
How coud I disable a ExtraButton ?
ngWizardConfig: NgWizardConfig = { toolbarSettings: { showNextButton: false, showPreviousButton: false } };
not sure if this is what you are looking for
ngWizardConfig: NgWizardConfig = { toolbarSettings: { showNextButton: false, showPreviousButton: false } };
not sure if this is what you are looking for
I think what he is asking is how to add disabled to the extra toolbar button. I am also looking for this. toolbarExtraButtons: [ { text: 'Finish', class: 'btn btn-info', event: () => { alert("Finished!!!"); } } ]
you can use nativeElement inject ElementRef and Renderer2 to your constructor
constructor(
private elem: ElementRef,
private renderer: Renderer2
) {}
then select your button by CSS class name, and using renderer set the attribute name disabled and value disabled
const nextbtn = this.elem.nativeElement.querySelectorAll('.ng-wizard-btn-next')[0];
this.renderer.setAttribute(nextbtn, 'disabled', 'disbaled');