]>
Commit | Line | Data |
---|---|---|
db400f44 C |
1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | |
0626e7af C |
3 | import { Account } from '@app/shared/account/account.model' |
4 | import { AccountService } from '@app/shared/account/account.service' | |
5 | ||
6 | @Component({ | |
7 | selector: 'my-account-about', | |
8 | templateUrl: './account-about.component.html', | |
9 | styleUrls: [ './account-about.component.scss' ] | |
10 | }) | |
11 | export class AccountAboutComponent implements OnInit { | |
6b738c7a | 12 | account: Account |
0626e7af C |
13 | |
14 | constructor ( | |
15 | protected route: ActivatedRoute, | |
16 | private accountService: AccountService | |
17 | ) { } | |
18 | ||
19 | ngOnInit () { | |
20 | // Parent get the account for us | |
21 | this.accountService.accountLoaded | |
22 | .subscribe(account => this.account = account) | |
23 | } | |
24 | ||
25 | getAccountDescription () { | |
26 | if (this.account.description) return this.account.description | |
27 | ||
28 | return 'No description' | |
29 | } | |
30 | } |