Ignore:
Timestamp:
12/19/21 19:39:00 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
bdd6491
Parents:
1ad8e64
Message:

spring security 2.0

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  
    11import { Component, OnInit } from '@angular/core';
     2import { Router } from '@angular/router';
     3import { DynamicDialogRef } from 'primeng/dynamicdialog';
     4import { LoginRequest } from 'src/app/_models/dto/loginRequest';
     5import { UserService } from 'src/app/_services/user.service';
    26
    37@Component({
     
    812export class LoginComponent implements OnInit {
    913
    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  }
    1121
    1222  ngOnInit(): void {
    1323  }
    1424
     25  onFormLogIn(loginRequest){
     26    this.ref.close(loginRequest);
     27   
     28  }
    1529}
Note: See TracChangeset for help on using the changeset viewer.