+ this.routeSub = this.route.params
+ .pipe(
+ map(params => params[ 'accountId' ]),
+ distinctUntilChanged(),
+ switchMap(accountId => this.accountService.getAccount(accountId)),
+ catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
+ )
+ .subscribe(account => this.account = account)
+ }