-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathwizard-step.component.ts
More file actions
42 lines (33 loc) · 940 Bytes
/
wizard-step.component.ts
File metadata and controls
42 lines (33 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {Component, Input, Output, EventEmitter, OnInit} from '@angular/core';
@Component({
selector: 'wizard-step',
template:
`
<div [hidden]="!isActive">
<ng-content></ng-content>
</div>
`
})
export class WizardStepComponent implements OnInit {
@Input() title: string;
@Input() hidden: boolean = false;
@Input() isValid: boolean = true;
@Input() showNext: boolean = true;
@Input() showPrev: boolean = true;
@Output() onNext: EventEmitter<any> = new EventEmitter<any>();
@Output() onPrev: EventEmitter<any> = new EventEmitter<any>();
@Output() onComplete: EventEmitter<any> = new EventEmitter<any>();
private _isActive: boolean = false;
isDisabled: boolean = true;
constructor() { }
ngOnInit(){
}
@Input('isActive')
set isActive(isActive: boolean) {
this._isActive = isActive;
this.isDisabled = false;
}
get isActive(): boolean {
return this._isActive;
}
}