NetanelBasal
10/24/2016 - 9:57 PM

async1.ts

import { Directive, forwardRef } from "@angular/core";
import { NG_ASYNC_VALIDATORS, Validator, AbstractControl } from "@angular/forms";
import { Observable } from "rxjs";
@Directive({
  selector: "[asyncValidator][formControlName], [asyncValidator][ngModel]",
  providers: [
    {
      provide: NG_ASYNC_VALIDATORS,
      useExisting: forwardRef(() => AsyncValidator), multi: true
    }
  ]
})