@angular/material/stepper#MatStepper TypeScript Examples
The following examples show how to use
@angular/material/stepper#MatStepper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: upload-assets.component.ts From assetMG with Apache License 2.0 | 6 votes |
onNext(stepper: MatStepper) {
if (stepper.selectedIndex == 1) {
switch (this.uploadAssetType) {
case this.assetTypes.IMG:
this.uploadImg.uploadToServer();
break;
case this.assetTypes.VIDEO:
!this.uploadVideo.form.invalid;
break;
case this.assetTypes.HTML:
this.uploadHtml.uploadToServer();
break;
default:
!this.uploadText.form.invalid;
}
// Reset any errors before moving to the next step
this.isErrorMessage = false;
this.uploadMessage = '';
}
stepper.next();
this.isChildFormValid = this.isCurrentStepValid(stepper);
}
Example #2
Source File: upload-assets.component.ts From assetMG with Apache License 2.0 | 6 votes |
isCurrentStepValid(stepper: MatStepper): boolean {
if (stepper.selectedIndex == 0 || stepper.selectedIndex == 2) {
return true;
} else {
switch (this.uploadAssetType) {
case this.assetTypes.IMG:
return this.uploadImg.isValid;
case this.assetTypes.HTML:
return this.uploadHtml.isValid;
case this.assetTypes.VIDEO:
return !this.uploadVideo.form.invalid;
default:
return !this.uploadText.form.invalid;
}
}
}
Example #3
Source File: support.component.ts From tuxedo-control-center with GNU General Public License v3.0 | 6 votes |
public buttonStartSysteminfo(systeminfoStepper: MatStepper): void {
this.systeminfoRunProgress = true;
this.runSysteminfo().then(() => {
this.systeminfoOutput('Done');
this.systeminfosCompleted = true;
systeminfoStepper.selected.completed = true;
systeminfoStepper.next();
}).catch(err => {
this.systeminfoRunOutput = err;
}).finally(() => {
this.systeminfoRunProgress = false;
});
}
Example #4
Source File: app.component.ts From RoboScan with GNU General Public License v3.0 | 5 votes |
@ViewChild('scannerstepper')
stepper: MatStepper;
Example #5
Source File: collection-import.component.ts From attack-workbench-frontend with Apache License 2.0 | 5 votes |
@ViewChild(MatStepper) public stepper: MatStepper;
Example #6
Source File: collection-index-import.component.ts From attack-workbench-frontend with Apache License 2.0 | 5 votes |
@ViewChild(MatStepper) public stepper: MatStepper;
Example #7
Source File: upload-assets.component.ts From assetMG with Apache License 2.0 | 5 votes |
onBack(stepper: MatStepper) {
stepper.previous();
this.isChildFormValid = this.isCurrentStepValid(stepper);
this.isBulkUpload = false;
}
Example #8
Source File: form.component.ts From coronatest with GNU Affero General Public License v3.0 | 5 votes |
getStepButton(stepper: MatStepper) {
if (this.submit) {
this.submitForm();
} else {
stepper.next();
}
}