Changeset 84d0fbb for trip-planner-front/src/app/homepage/login
- Timestamp:
- 12/19/21 19:39:00 (3 years ago)
- Branches:
- master
- Children:
- bdd6491
- Parents:
- 1ad8e64
- Location:
- trip-planner-front/src/app/homepage/login
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/homepage/login/login.component.html
r1ad8e64 r84d0fbb 1 <p>login works!</p> 1 <div class="p-col-12 p-md-4"> 2 <div class="p-inputgroup"> 3 <span class="p-inputgroup-addon"><i class="pi pi-user"></i></span> 4 <input type="text" pInputText placeholder="Email address (Username)" 5 [(ngModel)]="loginRequest.username" name="username"> 6 </div> 7 </div> 8 <div class="p-col-12 p-md-4"> 9 <div class="p-inputgroup"> 10 <span class="p-inputgroup-addon"><i class="pi pi-password"></i></span> 11 <input type="password" pInputText placeholder="Password" name="password" [(ngModel)]="loginRequest.password"> 12 </div> 13 </div> 14 15 <div class="p-col-12 p-md-4"> 16 <button pButton pRipple label="Log in" class="p-button-secondary" type="submit" 17 (click)="onFormLogIn(loginRequest)"></button> 18 </div> -
trip-planner-front/src/app/homepage/login/login.component.ts
r1ad8e64 r84d0fbb 1 1 import { Component, OnInit } from '@angular/core'; 2 import { Router } from '@angular/router'; 3 import { DynamicDialogRef } from 'primeng/dynamicdialog'; 4 import { LoginRequest } from 'src/app/_models/dto/loginRequest'; 5 import { UserService } from 'src/app/_services/user.service'; 2 6 3 7 @Component({ … … 8 12 export class LoginComponent implements OnInit { 9 13 10 constructor() { } 14 15 loginRequest : LoginRequest; 16 17 constructor(private ref: DynamicDialogRef, private router: Router, private userService : UserService) { 18 this.loginRequest = new LoginRequest(); 19 20 } 11 21 12 22 ngOnInit(): void { 13 23 } 14 24 25 onFormLogIn(loginRequest){ 26 this.ref.close(loginRequest); 27 28 } 15 29 }
Note:
See TracChangeset
for help on using the changeset viewer.