aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/form-elements/validation/validation.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/angular/form-elements/validation/validation.component.ts')
-rw-r--r--src/angular/form-elements/validation/validation.component.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/angular/form-elements/validation/validation.component.ts b/src/angular/form-elements/validation/validation.component.ts
index 4abdd12..289aeda 100644
--- a/src/angular/form-elements/validation/validation.component.ts
+++ b/src/angular/form-elements/validation/validation.component.ts
@@ -1,14 +1,10 @@
import { Input, Component, ContentChildren, EventEmitter, Output, QueryList, SimpleChanges, HostBinding, AfterContentInit } from "@angular/core";
-import { AbstractControl, FormControl } from "@angular/forms";
-import { Subscribable } from "rxjs/Observable";
-import { AnonymousSubscription } from "rxjs/Subscription";
-import { IValidator } from './validators/validator.interface';
import { ValidatorComponent } from './validators/base.validator.component';
import { RegexValidatorComponent } from './validators/regex.validator.component';
import { RequiredValidatorComponent } from './validators/required.validator.component';
import { ValidatableComponent } from './validatable.component';
import { CustomValidatorComponent } from './validators/custom.validator.component';
-import template from "./validation.component.html";
+import { template } from "./validation.component.html";
@Component({
selector: 'sdc-validation',
@@ -47,6 +43,9 @@ export class ValidationComponent implements AfterContentInit {
},
(error) => console.log('Validation subscribe error')
);
+ // init validateElement.valid.
+ const value = this.validateElement.getValue();
+ this.validateElement.notifier.next(value);
}
public validate = (): boolean => {