diff --git a/README.MD b/README.MD index 93cd8d3..c1d169a 100644 --- a/README.MD +++ b/README.MD @@ -101,12 +101,8 @@ $ npm run lint ``` ## Improvement -Click title to navigate -Hide/Show button -Disable visited steps after navigate to previous -Dynamically add/remove step -- [ ] Click title to navigate -- [ ] Hide/Show navigation button +- [x] Click title to navigate +- [x] Hide/Show navigation button - [ ] Disable visited steps after navigate to previous - [ ] Dynamically add/remove step diff --git a/src/wizard-step.component.ts b/src/wizard-step.component.ts index 55bb994..28beb1b 100644 --- a/src/wizard-step.component.ts +++ b/src/wizard-step.component.ts @@ -12,13 +12,16 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; export class WizardStepComponent implements OnInit { @Input() title: string; @Input() isValid: boolean = true; - private _isActive: boolean = false; - isDisabled: boolean = true; + @Input() showNext: boolean = true; + @Input() showPrev: boolean = true; @Output() onNext: EventEmitter = new EventEmitter(); @Output() onPrev: EventEmitter = new EventEmitter(); @Output() onComplete: EventEmitter = new EventEmitter(); + private _isActive: boolean = false; + isDisabled: boolean = true; + constructor() { } ngOnInit() { @@ -33,5 +36,4 @@ export class WizardStepComponent implements OnInit { return this._isActive; } - } diff --git a/src/wizard.component.ts b/src/wizard.component.ts index 0663eb8..adcad9a 100644 --- a/src/wizard.component.ts +++ b/src/wizard.component.ts @@ -16,8 +16,8 @@ import { WizardStepComponent } from './wizard-step.component'; `