1 import { Component, OnInit } from '@angular/core'
2 import { ActivatedRoute } from '@angular/router'
3 import { AccountService } from '@app/shared/account/account.service'
4 import { Account } from '@app/shared/account/account.model'
7 selector: 'my-account',
8 templateUrl: './account.component.html',
9 styleUrls: [ './account.component.scss' ]
11 export class AccountComponent implements OnInit {
12 private account: Account
15 private route: ActivatedRoute,
16 private accountService: AccountService
20 const accountId = parseInt(this.route.snapshot.params['accountId'], 10)
22 this.accountService.getAccount(accountId)
23 .subscribe(account => this.account = account)
27 return Account.GET_ACCOUNT_AVATAR_URL(this.account)