Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- 앵귤러 애니메이션
- modal
- 옵저버블
- 셀렉트박스 커스텀
- scroll
- angular route
- egov spring ajax 사용 예시
- angular button
- Ionic modal
- Angular Router
- ajax 사용 예시
- 검색
- summary
- 스크롤 이벤트
- flex-1
- 앵귤러 모달
- angular modal
- Router
- prisma
- 모달
- 호버
- mysql if
- Oracle LISTAGG 사용 예시
- 스크롤 이벤트 감지
- angular animation
- ApexChart
- route
- 아이오닉 스크롤 이벤트
- TAILWIND
- formgroup
Archives
- Today
- Total
목록observable (2)
깜놀하는 해므찌로
RXJS Observable 구독 중에 구독 취소하기 / 옵저버블 강제 구독 해제
const sub = this.scrollService.getScrollY().subscribe({ // 구독 시작 next: (scrollY) => { // 스크롤 좌표에 해당하는 페이지 넘버 1~8 리턴 const pageIndex = sections.findIndex((section) => this.checkVisible(section.nativeElement) ); // 마지막 페이지일 경우 구독 중지 if (pageIndex === 8) { sub.unsubscribe(); } }, });
IT
2023. 7. 15. 19:26
Angular Observable subscirbe
// 1번 사람의 정보를 받아 로그에 찍는 예시 this.http.get("https://swapi.dev/api/people/1") .subscribe(response => console.log(response)); // 원하는 데이터만 얻어내는 예시 this.http.get("https://swapi.dev/api/people/1") .pipe(map(response => ({ name: response.name, birthYear: response.birth_year, height: Number(response.height), weight: Number(response.mass), eyeColor: response.eye_color }))) .subscribe(luke => console.log(l..
IT
2023. 4. 8. 02:33