Skip to content

Instantly share code, notes, and snippets.

@anantl05
Created September 3, 2019 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anantl05/ff9ebea05e7caa9df9e8f9c7675cdaf5 to your computer and use it in GitHub Desktop.
Save anantl05/ff9ebea05e7caa9df9e8f9c7675cdaf5 to your computer and use it in GitHub Desktop.
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