Skip to content
Snippets Groups Projects
Select Git revision
  • d050b79b6602c43c35abe4fd659c3cb2ec9ef7c0
  • main default protected
  • documentation
  • admin_rights_refactor
4 results

user-dropdown.component.ts

Blame
  • Forked from an inaccessible project.
    user-dropdown.component.ts 559 B
    import { Component, Input, OnInit } from '@angular/core';
    import { User } from '../Types/types';
    import { AuthenticationService } from '../services/authentication.service';
    
    @Component({
      selector: 'app-user-dropdown',
      templateUrl: './user-dropdown.component.html',
      styleUrls: ['./user-dropdown.component.css']
    })
    export class UserDropdownComponent implements OnInit {
    
      @Input() username!: string;
    
      constructor(public auth: AuthenticationService) {}
    
      ngOnInit(): void {
          if (this.username === undefined)
            this.username = "Guest";
      }
    }