You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 regels
442 B

  1. import { Component } from '@angular/core';
  2. import { AccountService } from './_services';
  3. import { User } from './_models';
  4. @Component({ selector: 'app-root', templateUrl: 'app.component.html' })
  5. export class AppComponent {
  6. user?: User | null;
  7. constructor(private accountService: AccountService) {
  8. this.accountService.user.subscribe(x => this.user = x);
  9. }
  10. logout() {
  11. this.accountService.logout();
  12. }
  13. }