You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
796 B
35 lines
796 B
import { Component, OnInit } from '@angular/core';
|
|
import { NgForm } from '@angular/forms';
|
|
import { UserService } from 'src/app/services/user.service';
|
|
|
|
@Component({
|
|
selector: 'app-login',
|
|
templateUrl: './login.component.html',
|
|
styleUrls: ['./login.component.css']
|
|
})
|
|
export class LoginComponent implements OnInit {
|
|
|
|
emailid: string;
|
|
passWord: String;
|
|
isFormSubmitted : boolean;
|
|
login(loginForm : NgForm) {
|
|
if (loginForm.invalid) {
|
|
return;
|
|
}
|
|
this.isFormSubmitted=true;
|
|
|
|
if (this.emailid=="sooraj@mail.com" && this.passWord=="1234") {
|
|
alert("Correct Credentials...");
|
|
} else {
|
|
alert("Invalid Credentials...")
|
|
}
|
|
}
|
|
constructor(private _userService:UserService) {
|
|
this.isFormSubmitted=false;
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
|
|
}
|