Created
September 3, 2019 06:24
-
-
Save anantl05/ff9ebea05e7caa9df9e8f9c7675cdaf5 to your computer and use it in GitHub Desktop.
This file contains 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 { Component } from '@angular/core'; | |
import { FormControl, FormGroup } from '@angular/forms'; | |
import { equalPassValidator } from './shared/equal.validator.directive'; | |
@Component({ | |
selector: 'my-app', | |
templateUrl: './app.component.html', | |
styleUrls: [ './app.component.css' ] | |
}) | |
export class AppComponent { | |
name = 'Angular'; | |
signUpForm: FormGroup = new FormGroup({ | |
username: new FormControl(''), | |
password: new FormControl(''), | |
conPassword: new FormControl('', equalPassValidator('password')), | |
}) | |
get allControls() { | |
return this.signUpForm.controls; | |
} | |
submitData() { | |
// TODO something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment