diff --git a/bun.lockb b/bun.lockb index c478a94..88dbd54 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/app/app.component.html b/src/app/app.component.html index 2885c5f..af92333 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,7 +1,2 @@

{{'hello' | uppercase | text}}

-@for (let hotel of foundHotels | async) { - @if (search === "") { - - } -} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ca72008..bcdd8f3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -5,7 +5,7 @@ import { AsyncPipe, UpperCasePipe } from '@angular/common'; import { TextPipe } from '../text.pipe'; import { HotelService } from './Parent/services/hotel.service'; import { inject } from '@angular/core'; -import { filter, map, Observable, range } from 'rxjs'; +import { filter, from, map, Observable, range, tap, toArray } from 'rxjs'; @Component({ selector: 'app-root', @@ -20,20 +20,18 @@ export class AppComponent { public hotelService: HotelService = inject(HotelService); ngOnInit() { - const stream: Observable = range(1, 10); + const stream: Observable = from([5, 1, 2, 12, 5, 14, 17, 5, "testing"]); stream.pipe( - filter((value: number) => value % 2 === 1), - ).subscribe((value) => console.log(value)); - console.log('---') - - stream.pipe( - map((value: number) => value * 2) - ).subscribe((value) => console.log(value)); + filter((value) => typeof value === "number"), + tap((value) => console.log("Zahl:" + value)), + filter((value: number) => value % 2 === 0), + tap((value) => console.log("Gerade Zahl: " + value)), + toArray(), + ).subscribe(console.log); } public test() { - 8 console.log(this.search); }