Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
"bootstrap": "^4.0.0-alpha.6"
},
"devDependencies": {
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/compiler-cli": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
"@angular/platform-server": "^2.3.1",
"@angular/common": "^4.0.2",
"@angular/compiler": "^4.0.2",
"@angular/compiler-cli": "^4.0.2",
"@angular/core": "^4.0.2",
"@angular/platform-browser": "^4.0.2",
"@angular/platform-browser-dynamic": "^4.0.2",
"@angular/platform-server": "^4.0.2",
"@types/es6-shim": "^0.31.32",
"@types/jasmine": "^2.5.42",
"@types/selenium-webdriver": "^2.53.39",
"@types/selenium-webdriver": "^3.0.1",
"awesome-typescript-loader": "^3.0.4-rc.2",
"codelyzer": "^0.0.28",
"codelyzer": "^2.1.1",
"istanbul-instrumenter-loader": "^2.0.0",
"jasmine-core": "^2.5.2",
"karma": "^1.4.1",
Expand All @@ -55,15 +55,19 @@
"karma-remap-coverage": "^0.1.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2",
"rxjs": "^5.0.1",
"source-map-loader": "^0.1.6",
"rxjs": "^5.1.0",
"source-map-loader": "^0.2.1",
"ts-helpers": "^1.1.2",
"tslint": "^3.15.1",
"typescript": "^2.1.6",
"tslint": "~4.0.0",
"typescript": "^2.2.1",
"webpack": "^2.2.1",
"zone.js": "0.7.2"
"zone.js": "0.8.5"
},
"engines": {
"node": ">=0.8.0"
},
"_comment01": {
"typings": "./dist/index.d.ts"
}

}
8 changes: 6 additions & 2 deletions src/wizard-step.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';

@Component({
selector: 'wizard-step',
Expand All @@ -9,7 +9,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
</div>
`
})
export class WizardStepComponent {
export class WizardStepComponent implements OnInit {
@Input() title: string;
@Input() hidden: boolean = false;
@Input() isValid: boolean = true;
Expand All @@ -25,6 +25,10 @@ export class WizardStepComponent {

constructor() { }

ngOnInit(){

}

@Input('isActive')
set isActive(isActive: boolean) {
this._isActive = isActive;
Expand Down
7 changes: 5 additions & 2 deletions src/wizard.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Output, EventEmitter, ContentChildren, QueryList, AfterContentInit } from '@angular/core';
import { Component, Output, EventEmitter, ContentChildren, QueryList, AfterContentInit, OnInit } from '@angular/core';
import { WizardStepComponent } from './wizard-step.component';

@Component({
Expand Down Expand Up @@ -34,7 +34,7 @@ import { WizardStepComponent } from './wizard-step.component';
'.completed { cursor: default; }'
]
})
export class WizardComponent implements AfterContentInit {
export class WizardComponent implements OnInit, AfterContentInit {
@ContentChildren(WizardStepComponent)
wizardSteps: QueryList<WizardStepComponent>;

Expand All @@ -46,6 +46,9 @@ export class WizardComponent implements AfterContentInit {

constructor() { }

ngOnInit(){

}
ngAfterContentInit() {
this.wizardSteps.forEach(step => this._steps.push(step));
this.steps[0].isActive = true;
Expand Down