Created
March 18, 2019 14:56
-
-
Save mdmoin7/c3db086026f0a805e94a1c2cfa28dace to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Directive } from '@angular/core'; | |
import { NG_VALIDATORS } from '@angular/forms'; | |
import { zipCodeValidator } from '../forms/validators'; | |
@Directive({ | |
selector: '[appZipCode][ngModel]', | |
providers: [ | |
{ | |
provide: NG_VALIDATORS, | |
useValue: zipCodeValidator, | |
multi: true | |
} | |
] | |
}) | |
export class ZipCodeDirective { | |
constructor() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment