changeuserpassword.component.ts 1.12 KB
import { Component, OnInit } from '@angular/core';
import { UserService } from './UpdateProfile/user.service';
import { Router } from '@angular/router';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { IUser } from './UpdateProfile/datamodel';
import { Http, Response } from '@angular/http';
//import { Global } from '../../Shared/global';
//import { DBOperation } from 'S';
//import { Observable } from 'rxjs/Observable';

@Component({
    templateUrl: '../components/changeuserpassword.component.html'
})

export class ChangeUserPassword implements OnInit {

  constructor(private userservice: UserService, private router: Router, private fb: FormBuilder) { }
  
    ngOnInit(): void { }
  
    formErrors = {
        'firstName': '',
        'lastName': '',
        'email': ''
    };

    validationMessages = {
        'firstName': {
            'required': 'First name is required.'
        },
        'lastName': {
            'required': 'Last name is required.'
        },
        'email': {
            'required': 'Email is required.',
            'pattern': 'Email pattern is not valid.'
        }
    }
  
}