We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d342a7 commit 5bbdc3cCopy full SHA for 5bbdc3c
apps/signal/54-pipe-observable-to-signal/src/app/currency.pipe.ts
@@ -1,5 +1,4 @@
1
import { inject, Pipe, PipeTransform } from '@angular/core';
2
-import { map, Observable } from 'rxjs';
3
import { CurrencyService } from './currency.service';
4
5
@Pipe({
@@ -9,7 +8,7 @@ import { CurrencyService } from './currency.service';
9
8
export class CurrencyPipe implements PipeTransform {
10
currencyService = inject(CurrencyService);
11
12
- transform(price: number): Observable<string> {
13
- return this.currencyService.symbol$.pipe(map((s) => `${price}${s}`));
+ transform(price: number): string {
+ return `${price}${this.currencyService.symbol()}`;
14
}
15
0 commit comments