diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-25 16:56:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-25 16:56:13 +0200 |
commit | 170726f523ff48f89da45473fc53ca54784f43dd (patch) | |
tree | f9f783ebdfc934c6831396c2bf33f658d6640583 /client/src/app/+accounts/accounts.component.ts | |
parent | cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae (diff) | |
download | PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.gz PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.zst PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.zip |
Implement video channel views
Diffstat (limited to 'client/src/app/+accounts/accounts.component.ts')
-rw-r--r-- | client/src/app/+accounts/accounts.component.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts new file mode 100644 index 000000000..1298803c3 --- /dev/null +++ b/client/src/app/+accounts/accounts.component.ts | |||
@@ -0,0 +1,24 @@ | |||
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' | ||
5 | |||
6 | @Component({ | ||
7 | templateUrl: './accounts.component.html', | ||
8 | styleUrls: [ './accounts.component.scss' ] | ||
9 | }) | ||
10 | export class AccountsComponent implements OnInit { | ||
11 | account: Account | ||
12 | |||
13 | constructor ( | ||
14 | private route: ActivatedRoute, | ||
15 | private accountService: AccountService | ||
16 | ) {} | ||
17 | |||
18 | ngOnInit () { | ||
19 | const accountId = parseInt(this.route.snapshot.params['accountId'], 10) | ||
20 | |||
21 | this.accountService.getAccount(accountId) | ||
22 | .subscribe(account => this.account = account) | ||
23 | } | ||
24 | } | ||