即使出现错误,它也会导航到下一步。下面是我的代码。请帮忙
ngAfterViewInit() {
// Initialize form wizard
const wizard = new KTWizard(this.el.nativeElement, {
startStep: 1
});
// Validation before going to next page
wizard.on('beforeNext', function (wizardObj) {
// validate the form and use below function to stop the wizard's step
const form = this.addLocationForm as FormGroup;
if(!form.valid) {
wizardObj.stop();
console.log(form.errors);
}
});