/* * Copyright (c) 2016 VMware, Inc. All Rights Reserved. * This software is released under MIT license. * The full license information can be found in LICENSE in the root directory of this project. */ import {Component, ViewChild} from "@angular/core"; import {Wizard} from 'clarity-angular/wizard/wizard'; @Component({ selector: "clr-wizard-simple", templateUrl: "./wizard-simple.demo.html" }) export class WizardSimple { @ViewChild("wizard") wizard: Wizard; stepToSkip: string = "step2"; onChangeStepToSkip(tabId: string): void { if (tabId === "step2") { this.wizard.skipTab(tabId); this.wizard.unSkipTab("step3"); } else { this.wizard.skipTab(tabId); this.wizard.unSkipTab("step2"); } } code: string = ` import {Component, ViewChild} from "@angular/core"; import {Wizard} from "clarity-angular"; @Component({ ... }) export class WizardSimple { @ViewChild("wizard") wizard: Wizard; stepToSkip: string = "step2"; onChangeStepToSkip(tabId: string): void { if (tabId === "step2") { this.wizard.skipTab(tabId); this.wizard.unSkipTab("step3"); } else { this.wizard.skipTab(tabId); this.wizard.unSkipTab("step2"); } } } `; html: string = `
Wizard Title
Step 1 Step 2 Step 3

Select the step to skip

My custom title for step 2
Step 2 is your last step, because you opted to skip step 3.
We went straight to Step 3, because you opted to skip step 2.
`; }