2017-03-08 5 views
2

iOS 용 ionic 2에서 웹 애니메이션 작업을 어떻게 받습니까? 웹 애니메이션 인 polyfill에 대한 이야기를 보았지만 구현에 대한 가이드를 따르기는 쉽지 않습니다. 어떤 도움을 주시면 감사하겠습니다. 감사!웹 애니메이션 ionic 2 iOS

답변

3

그냥 당신이 Angular2 docs

각도 애니메이션은 표준 웹 애니메이션 API 위에 구축에보고를 지원하는 브라우저에서 기본적으로 실행할 수 있습니다 좋아한다. 다른 브라우저의 경우 polyfill이 필요합니다. GitHub의 web-animations.min.js 을 잡고 페이지에 추가하십시오.

는 그래서 web-animations js code을 복사 assets/js (새 폴더)에, 예를 들어,있는 새 파일에 붙여 넣습니다.

<body> 

    <!-- Ionic's root component and where the app will load --> 
    <ion-app></ion-app> 

    <!-- Web Animations polyfill --> 
    <script src="assets/js/web-animations.js"></script> 

    <!-- The polyfills js is generated during the build process --> 
    <script src="build/polyfills.js"></script> 

    <!-- The bundle js is generated during the build process --> 
    <script src="build/main.js"></script> 

</body> 
:

그리고 몸에서 첫 번째 스크립트 태그 같이 index.html 파일에 추가