Project

General

Profile

1
import {Injectable} from "@angular/core";
2

    
3
@Injectable()
4
export class AuthenticationService {
5
  isLoggedIn: boolean = false;
6
  username: string;
7
  userEmail: string;
8
  userFullName: string;
9

    
10
  login(){
11
    this.isLoggedIn = true;
12
    this.username = 'antleb';
13
    this.userEmail = 'ant.lebesis@gmail.com';
14
    this.userFullName = 'Antonis Lempesis';
15
  }
16

    
17
  logout(){
18
    this.isLoggedIn = false;
19
    this.username = '';
20
    this.userEmail = '';
21
    this.userFullName = '';
22
  }
23

    
24
  register(){
25

    
26
  }
27

    
28
  getUserEmail() {
29
    return this.userEmail;
30
  }
31
}
(2-2/8)