UNPKG

579 BPlain TextView Raw
1import { Component, OnInit } from '@angular/core';
2import { ApiService, IAccount, IMe, IUser } from '@armor/api';
3
4@Component({
5 selector: 'app-hello-armor',
6 templateUrl: './hello-armor.component.html',
7 styleUrls: ['./hello-armor.component.scss']
8})
9export class HelloArmorComponent implements OnInit {
10 constructor(
11 private apiService: ApiService
12 ) { }
13
14 public user: IUser;
15 public accounts: IAccount[];
16
17 ngOnInit() {
18 this.apiService.get('me').subscribe((result: IMe) => {
19 this.user = result.user;
20 this.accounts = result.accounts;
21 });
22 }
23}