diff --git a/package.json b/package.json index 815f529e..f0c1db51 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } + } diff --git a/src/wizard-step.component.ts b/src/wizard-step.component.ts index 1c457dc3..f2d9d48c 100644 --- a/src/wizard-step.component.ts +++ b/src/wizard-step.component.ts @@ -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', @@ -9,7 +9,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; ` }) -export class WizardStepComponent { +export class WizardStepComponent implements OnInit { @Input() title: string; @Input() hidden: boolean = false; @Input() isValid: boolean = true; @@ -25,6 +25,10 @@ export class WizardStepComponent { constructor() { } + ngOnInit(){ + + } + @Input('isActive') set isActive(isActive: boolean) { this._isActive = isActive; diff --git a/src/wizard.component.ts b/src/wizard.component.ts index 8953f89a..060e591b 100644 --- a/src/wizard.component.ts +++ b/src/wizard.component.ts @@ -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({ @@ -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; @@ -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;