Skip to content

Instantly share code, notes, and snippets.

@anantl05
Created September 3, 2019 05:26
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/2cacc45bb395c62c69e19fc744d25858 to your computer and use it in GitHub Desktop.
Save anantl05/2cacc45bb395c62c69e19fc744d25858 to your computer and use it in GitHub Desktop.
import { Component } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
@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(''),
})
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