Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit, ViewChild } from '@angular/core';
- import { NgForm } from '@angular/forms';
- @Component({
- selector: 'app-register',
- templateUrl: './register.component.html',
- styleUrls: ['./register.component.scss']
- })
- export class RegisterComponent implements OnInit {
- @ViewChild('f', { static: false }) signupForm: NgForm;
- constructor(private apiService: ApiService) { }
- ngOnInit() {
- }
- signup(){
- if(this.signupForm.valid == true)
- {
- console.log(this.signupForm.value);
- }else{
- console.log("Form is Not Valid.");
- }
- }
- }
Add Comment
Please, Sign In to add comment