Compare commits
2 Commits
3c90fde4bf
...
ca1fb33ad9
Author | SHA1 | Date | |
---|---|---|---|
ca1fb33ad9 | |||
382e5263bf |
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
@ -28,7 +28,7 @@
|
|||||||
"@angular/compiler-cli": "^18.2.3",
|
"@angular/compiler-cli": "^18.2.3",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"jasmine-core": "~5.1.0",
|
"jasmine-core": "~5.3.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.0",
|
||||||
@ -36,6 +36,6 @@
|
|||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
"postcss": "^8.4.41",
|
"postcss": "^8.4.41",
|
||||||
"tailwindcss": "^3.4.10",
|
"tailwindcss": "^3.4.10",
|
||||||
"typescript": "~5.5.2"
|
"typescript": "~5.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import { UpperCasePipe } from '@angular/common';
|
|||||||
import { TextPipe } from '../text.pipe';
|
import { TextPipe } from '../text.pipe';
|
||||||
import { HotelService } from './Parent/services/hotel.service';
|
import { HotelService } from './Parent/services/hotel.service';
|
||||||
import { inject } from '@angular/core';
|
import { inject } from '@angular/core';
|
||||||
import { filter, map, Observable } from 'rxjs';
|
import { filter, map, Observable, range } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -20,27 +20,20 @@ export class AppComponent {
|
|||||||
public hotelService: HotelService = inject(HotelService);
|
public hotelService: HotelService = inject(HotelService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
const stream: Observable<number> = new Observable((observer) => {
|
const stream: Observable<number> = range(1, 10);
|
||||||
observer.next(1);
|
|
||||||
observer.next(2);
|
|
||||||
observer.next(3);
|
|
||||||
observer.next(4);
|
|
||||||
observer.next(5);
|
|
||||||
observer.next(6);
|
|
||||||
observer.next(7);
|
|
||||||
observer.next(8);
|
|
||||||
observer.next(9);
|
|
||||||
observer.next(10);
|
|
||||||
observer.complete();
|
|
||||||
});
|
|
||||||
|
|
||||||
stream.pipe(
|
stream.pipe(
|
||||||
filter((value: number) => value % 2 === 1),
|
filter((value: number) => value % 2 === 1),
|
||||||
|
).subscribe((value) => console.log(value));
|
||||||
|
console.log('---')
|
||||||
|
|
||||||
|
stream.pipe(
|
||||||
map((value: number) => value * 2)
|
map((value: number) => value * 2)
|
||||||
).subscribe((value) => console.log(value));
|
).subscribe((value) => console.log(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public test() {
|
public test() {
|
||||||
|
8
|
||||||
console.log(this.search);
|
console.log(this.search);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user