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 |
Tags
- 스크롤 이벤트
- route
- prisma
- 아이오닉 스크롤 이벤트
- flex-1
- ajax 사용 예시
- scroll
- summary
- modal
- 모달
- formgroup
- 셀렉트박스 커스텀
- angular route
- angular modal
- 앵귤러 애니메이션
- 호버
- Oracle LISTAGG 사용 예시
- Router
- 앵귤러 모달
- TAILWIND
- mysql if
- 옵저버블
- angular animation
- ApexChart
- 스크롤 이벤트 감지
- Ionic modal
- egov spring ajax 사용 예시
- Angular Router
- 검색
- angular button
Archives
- Today
- Total
깜놀하는 해므찌로
옵저버 객체 구독하기 본문
반응형
SMALL
// 3개의 값을 전달하도록 옵저버블을 간단하게 정의합니다.
const myObservable = of(1, 2, 3);
// 옵저버 객체를 정의합니다.
const myObserver = {
next: (x: number) => console.log('Observer got a next value: ' + x),
error: (err: Error) => console.error('Observer got an error: ' + err),
complete: () => console.log('Observer got a complete notification'),
};
// 옵저버 객체를 실행합니다.
myObservable.subscribe(myObserver);
// 로그:
// Observer got a next value: 1
// Observer got a next value: 2
// Observer got a next value: 3
// Observer got a complete notification
반응형
LIST
'IT' 카테고리의 다른 글
C언어 for문 기본 구조 예시 (0) | 2023.04.04 |
---|---|
C언어 반복문 While 문 기본 구조 예시 (0) | 2023.04.03 |
github git clone 방법 / 깃허브 클론 예시 (0) | 2023.04.03 |
vue.js 기본 구조 예시 (0) | 2023.04.02 |
C언어 조건문 IF 기본 구조 예시 (0) | 2023.04.01 |