]>
Commit | Line | Data |
---|---|---|
0626e7af C |
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({ | |
170726f5 C |
7 | templateUrl: './accounts.component.html', |
8 | styleUrls: [ './accounts.component.scss' ] | |
0626e7af | 9 | }) |
170726f5 | 10 | export class AccountsComponent implements OnInit { |
6b738c7a | 11 | account: Account |
0626e7af C |
12 | |
13 | constructor ( | |
14 | private route: ActivatedRoute, | |
15 | private accountService: AccountService | |
16 | ) {} | |
17 | ||
18 | ngOnInit () { | |
d14a9532 | 19 | const accountId = this.route.snapshot.params['accountId'] |
0626e7af C |
20 | |
21 | this.accountService.getAccount(accountId) | |
22 | .subscribe(account => this.account = account) | |
23 | } | |
0626e7af | 24 | } |