import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core'; import { ButtonModel } from '../../../models/button/button.model'; import { ButtonStylingModel } from '../../../models/button/button-styling.model'; import { WizardModel } from '../../../models/wizard/wizard.model'; import { WizardStylingModel } from '../../../models/wizard/wizard-styling.model'; import { WizardStepModel } from '../../../models/wizard/wizard-step.model'; import { WizardStepStylingModel } from '../../../models/wizard/wizard-step-styling.model'; @Component ({ selector: 'cf-demo-wizard-1', template: "

Static Wizard with step index as prefix

Step1

Step2

Step3

Step4

Dynamic Wizard with step index as icon

Step - {{i+1}}

", styles: ["/deep/ .my-wizard-next-button.mat-button, /deep/ .my-wizard-step-header-button.mat-button { color: orange; background: purple; } /deep/ .my-custom-wizard .cf-wizard-step-button .cf-button-all-content { flex-direction: row-reverse; } "] }) export class CfDemoWizard1 implements OnInit { myWizard = new WizardModel({ showStepNumberAsIcon: true, }); myWizard2 = new WizardModel({ showStepNumberAsPrefix: true, }); myWizardStyles = new WizardStylingModel({ container: { class: "my-custom-wizard" }, nextButton: new ButtonStylingModel({ button: { class: "my-wizard-next-button ", } }) }); steps = [ new WizardStepModel({ header: { label: "Step" }, isValid: true }), new WizardStepModel({ header: { label: "Step" }, isValid: true }), new WizardStepModel({ header: { label: "Step" }, isValid: true }), new WizardStepModel({ header: { label: "Step" }, isValid: true }), new WizardStepModel({ header: { label: "Step" }, isValid: true }), ]; myWizardStepStyles = new WizardStepStylingModel({ container: { class: "my-custom-wizard-step" }, header: new ButtonStylingModel({ button: { class: "my-wizard-step-header-button ", } }) }) ngOnInit() { setTimeout(() => { // this.steps[2]['isValid'] = false; }, 5000); console.log('demo wizard', this); } }