From 1e9009f66528312f0f21335768dd4cd8f8eb15e8 Mon Sep 17 00:00:00 2001
From: Krishna Nanda <59322@hexaware.com>
Date: Fri, 17 Sep 2021 15:20:30 +0530
Subject: [PATCH] login
---
login/login.component.css | 3 +++
login/login.component.html | 36 +++++++++++++++++++++++++++++
login/login.component.spec.ts | 25 ++++++++++++++++++++
login/login.component.ts | 43 +++++++++++++++++++++++++++++++++++
4 files changed, 107 insertions(+)
create mode 100644 login/login.component.css
create mode 100644 login/login.component.html
create mode 100644 login/login.component.spec.ts
create mode 100644 login/login.component.ts
diff --git a/login/login.component.css b/login/login.component.css
new file mode 100644
index 0000000..20cf3d1
--- /dev/null
+++ b/login/login.component.css
@@ -0,0 +1,3 @@
+.descriptionModal{
+ background-image: url("/assets/Images/download.jpg");
+}
\ No newline at end of file
diff --git a/login/login.component.html b/login/login.component.html
new file mode 100644
index 0000000..b4b1ccd
--- /dev/null
+++ b/login/login.component.html
@@ -0,0 +1,36 @@
+
+ Welcome to Urban Bazaar !!!
+
+
+
+
+ Kindly please login/signup to experience our service
+
+
+
+ OR
+
+
+
+
\ No newline at end of file
diff --git a/login/login.component.spec.ts b/login/login.component.spec.ts
new file mode 100644
index 0000000..d2c0e6c
--- /dev/null
+++ b/login/login.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LoginComponent } from './login.component';
+
+describe('LoginComponent', () => {
+ let component: LoginComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ LoginComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LoginComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/login/login.component.ts b/login/login.component.ts
new file mode 100644
index 0000000..1152b24
--- /dev/null
+++ b/login/login.component.ts
@@ -0,0 +1,43 @@
+import { Component, OnInit } from '@angular/core';
+import { NgForm } from '@angular/forms';
+import { Router } from '@angular/router';
+
+import { User } from 'src/app/models/user';
+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 {
+ // logindata={ emailid: '',
+ // passWord: ''}
+ user:User
+ isFormSubmitted : boolean;
+ login(loginForm : NgForm) {
+ // console.log(this.logindata)
+ console.log(this.user)
+ if (loginForm.invalid) {
+ return;
+ }
+ // this.isFormSubmitted=true;
+ // this._userService.loginUser(this.user).subscribe(x => { alert("Signup Successful")})
+
+ if (this.user.username=="shawn@mail.com" && this.user.userpassword=="1234") {
+ alert("Correct Credentials...");
+this._router.navigate(['home'])
+ } else {
+ alert("Invalid Credentials...")
+ }
+ }
+ constructor(private _userService:UserService,private _router:Router) {
+ this.user =new User()
+ this.isFormSubmitted=false;
+ }
+
+ ngOnInit(): void {
+ }
+
+
+}