From 42bf065765d87552220d54acfffb916e372b52f7 Mon Sep 17 00:00:00 2001 From: thmue Date: Thu, 6 Apr 2017 14:15:29 +0200 Subject: [PATCH 1/3] added i18n annotation for buttons --- src/wizard.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wizard.component.ts b/src/wizard.component.ts index 20e8bb9..1958dd7 100644 --- a/src/wizard.component.ts +++ b/src/wizard.component.ts @@ -16,9 +16,9 @@ import { WizardStepComponent } from './wizard-step.component'; ` , From 9ae2d12c647674e760e8548850b086d86eae1d07 Mon Sep 17 00:00:00 2001 From: thmue Date: Thu, 6 Apr 2017 14:17:45 +0200 Subject: [PATCH 2/3] removed private properties, necessary for ng aot https://github.com/angular/angular-cli/issues/5621 --- src/wizard.component.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wizard.component.ts b/src/wizard.component.ts index 1958dd7..b43f8d0 100644 --- a/src/wizard.component.ts +++ b/src/wizard.component.ts @@ -33,13 +33,12 @@ import { WizardStepComponent } from './wizard-step.component'; '.disabled { color: #ccc; }', '.completed { cursor: default; }' ] -}) export class WizardComponent implements OnInit, AfterContentInit { @ContentChildren(WizardStepComponent) wizardSteps: QueryList; - private _steps: Array = []; - private _isCompleted: boolean = false; + _steps: Array = []; + _isCompleted: boolean = false; @Output() onStepChanged: EventEmitter = new EventEmitter(); @@ -54,19 +53,19 @@ export class WizardComponent implements OnInit, AfterContentInit { this.steps[0].isActive = true; } - private get steps(): Array { + get steps(): Array { return this._steps.filter(step => !step.hidden); } - private get isCompleted(): boolean { + get isCompleted(): boolean { return this._isCompleted; } - private get activeStep(): WizardStepComponent { + get activeStep(): WizardStepComponent { return this.steps.find(step => step.isActive); } - private set activeStep(step: WizardStepComponent) { + set activeStep(step: WizardStepComponent) { if (step !== this.activeStep && !step.isDisabled) { this.activeStep.isActive = false; step.isActive = true; @@ -74,15 +73,15 @@ export class WizardComponent implements OnInit, AfterContentInit { } } - private get activeStepIndex(): number { + get activeStepIndex(): number { return this.steps.indexOf(this.activeStep); } - private get hasNextStep(): boolean { + get hasNextStep(): boolean { return this.activeStepIndex < this.steps.length - 1; } - private get hasPrevStep(): boolean { + get hasPrevStep(): boolean { return this.activeStepIndex > 0; } @@ -116,3 +115,4 @@ export class WizardComponent implements OnInit, AfterContentInit { } } + From 1e9bcdeafc351d4997727d755a8292dd419e0a9b Mon Sep 17 00:00:00 2001 From: thmue Date: Thu, 6 Apr 2017 14:29:27 +0200 Subject: [PATCH 3/3] fixed missing bracket --- src/wizard.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wizard.component.ts b/src/wizard.component.ts index b43f8d0..630b793 100644 --- a/src/wizard.component.ts +++ b/src/wizard.component.ts @@ -33,12 +33,13 @@ import { WizardStepComponent } from './wizard-step.component'; '.disabled { color: #ccc; }', '.completed { cursor: default; }' ] + }) export class WizardComponent implements OnInit, AfterContentInit { @ContentChildren(WizardStepComponent) wizardSteps: QueryList; - _steps: Array = []; - _isCompleted: boolean = false; + private _steps: Array = []; + private _isCompleted: boolean = false; @Output() onStepChanged: EventEmitter = new EventEmitter();