UNPKG

@armor/create-armor-ui

Version:

A CLI tool for generating Armor UI apps.

24 lines (20 loc) 586 B
import { Component, OnInit } from '@angular/core'; import { ApiService, IAccount, IMe, IUser } from '@armor/api'; @Component({ selector: 'app-hello-armor', templateUrl: './hello-armor.component.html', styleUrls: ['./hello-armor.component.scss'] }) export class HelloArmorComponent implements OnInit { constructor( private apiService: ApiService ) { } public user: IUser; public accounts: IAccount[]; public ngOnInit() { this.apiService.get('me').subscribe((result: IMe) => { this.user = result.user; this.accounts = result.accounts; }); } }