AngularJS Animations 무엇이 필요합니까? > 퍼블리싱강좌

퍼블리싱강좌

AngularJS Animations 무엇이 필요합니까? 정보

AngularJS AngularJS Animations 무엇이 필요합니까?

본문

AngularJS Animations

무엇이 필요합니까?

애니메이션을위한 응용 프로그램을 준비하려면 AngularJS Animate 라이브러리를 포함해야합니다.

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-animate.js"></script>

그런 다음 ngAnimate응용 프로그램 의 모듈을 참조해야합니다 .

<body ng-app="ngAnimate">
또는 응용 프로그램에 이름 ngAnimate이 있으면 응용 프로그램 모듈에 종속성으로 추가 합니다.


<body ng-app="myApp">

<h1>Hide the DIV: <input type="checkbox" ng-model="myCheck"></h1>

<div ng-hide="myCheck"></div>

<script>
var app = angular.module('myApp', ['ngAnimate']);
</script>


[전체소스]
<!DOCTYPE html>
<html>
<style>
div {
  transition: all linear 0.5s;
  background-color: lightblue;
  height: 100px;
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
}

.ng-hide {
  height: 0;
  width: 0;
  background-color: transparent;
  top:-200px;
  left: 200px;
}

</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-animate.js"></script>

<body ng-app="myApp">

<h1>Hide the DIV: <input type="checkbox" ng-model="myCheck"></h1>

<div ng-hide="myCheck"></div>

<script>
var app = angular.module('myApp', ['ngAnimate']);
</script>

</body>
</html>
추천
0

댓글 0개

전체 86
퍼블리싱강좌 내용 검색 AngularJS에서

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT