25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- import { Component } from '@angular/core';
-
- import { AccountService } from './_services';
- import { User } from './_models';
-
- @Component({ selector: 'app-root', templateUrl: 'app.component.html' })
- export class AppComponent {
- user?: User | null;
-
- constructor(private accountService: AccountService) {
- this.accountService.user.subscribe(x => this.user = x);
- }
-
- logout() {
- this.accountService.logout();
- }
- }
|