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
- prisma
- angular modal
- egov spring ajax 사용 예시
- angular animation
- angular route
- modal
- Angular Router
- ApexChart
- Router
- scroll
- 모달
- Oracle LISTAGG 사용 예시
- route
- 스크롤 이벤트
- flex-1
- Ionic modal
- 셀렉트박스 커스텀
- mysql if
- TAILWIND
- 스크롤 이벤트 감지
- 옵저버블
- 앵귤러 애니메이션
- formgroup
- 앵귤러 모달
- angular button
- ajax 사용 예시
- 아이오닉 스크롤 이벤트
- 호버
- summary
- 검색
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 |