]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+accounts/account-about/account-about.component.ts
Upgrade to rxjs 6
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / account-about / account-about.component.ts
CommitLineData
db400f44
C
1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router'
0626e7af
C
3import { Account } from '@app/shared/account/account.model'
4import { 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})
11export 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}