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
- ajax 사용 예시
- 앵귤러 애니메이션
- 스크롤 이벤트
- Ionic modal
- angular route
- angular modal
- summary
- TAILWIND
- Oracle LISTAGG 사용 예시
- angular animation
- scroll
- 모달
- route
- 아이오닉 스크롤 이벤트
- 앵귤러 모달
- 셀렉트박스 커스텀
- mysql if
- prisma
- formgroup
- 호버
- egov spring ajax 사용 예시
- Angular Router
- ApexChart
- angular button
- 옵저버블
- 스크롤 이벤트 감지
- modal
- flex-1
- 검색
- Router
Archives
- Today
- Total
깜놀하는 해므찌로
Angular Ionic 스크롤 이벤트 감지 / Angular animation 앵귤러 애니메이션 본문
반응형
SMALL
<ion-content [scrollEvents]="true" (ionScroll)="ionScroll($event)">
[ngClass]="setTopbarStyle()" scrollAnimation="introTop">
import { AnimationBuilder } from '@angular/animations';
import { Injectable } from '@angular/core';
import { fromFadeIn, fromFadeOut, toFadeIn, toFadeOut } from './animation/fade.animation';
import { fromFocusIn, toFocusIn } from './animation/fucus.animation';
import {
fromIntroBottom,
fromIntroBottomStagger,
fromIntroleft, fromIntroRight,
fromIntroTop,
toIntroBottom,
toIntroLeft,
toIntroRight,
toIntroTop
} from './animation/into.animation';
export type ScrollAnimation =
'fadeIn' | 'fadeOut' |
'introTop' | 'introRight' | 'introBottom' | 'introLeft' |
'introBottomStagger' |
'focusIn';
@Injectable()
export class ScrollAnimationService {
constructor(
private animationBuilder: AnimationBuilder,
) { }
build(scrollAnimation: ScrollAnimation) {
switch (scrollAnimation) {
case 'fadeIn':
return { properties: toFadeIn, animation: this.animationBuilder.build(fromFadeIn) };
case 'fadeOut':
return { properties: toFadeOut, animation: this.animationBuilder.build(fromFadeOut) };
case 'introTop': // 요렇게 사용!
return { properties: toIntroTop, animation: this.animationBuilder.build(fromIntroTop) };
case 'introRight':
return { properties: toIntroRight, animation: this.animationBuilder.build(fromIntroRight) };
case 'introBottom':
return { properties: toIntroBottom, animation: this.animationBuilder.build(fromIntroBottom) };
case 'introLeft':
return { properties: toIntroLeft, animation: this.animationBuilder.build(fromIntroleft) };
case 'focusIn':
return { properties: toFocusIn, animation: this.animationBuilder.build(fromFocusIn) };
case 'introBottomStagger':
return { properties: toFadeIn, animation: this.animationBuilder.build(fromIntroBottomStagger) };
}
}
}
반응형
LIST
'IT' 카테고리의 다른 글
Angular Radio Component 생성 및 활용 예시 (0) | 2023.06.27 |
---|---|
TypeScript Record 레코드 StringMap 활용 예시 (0) | 2023.06.26 |
Typescript 배열 중복 제거 (0) | 2023.06.25 |
Angular input-date component 활용 예시 (0) | 2023.06.24 |
Angular Toast IONIC토스트 활용 예시 (0) | 2023.06.23 |