Tutorial 14.1 Basic Example of Animation
******************************************INDEX.HTML*****************************************************
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-animate-ng-show-production</title>
<link href="animations.css" rel="stylesheet" type="text/css">
<script src="//code.angularjs.org/snapshot/angular.min.js"></script>
<script src="//code.angularjs.org/snapshot/angular-animate.js"></script>
</head>
<body ng-app="ngAnimate">
<div ng-init="checked = true">
<label>
<input type="checkbox" ng-model="checked" />
Is visible
</label>
<div class="content-area sample-show-hide" ng-show="checked">
Content...
</div>
</div>
</body>
</html>
<!--
Copyright 2019 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
******************************************INDEX.HTML*****************************************************
********************************************animation.css***************************************************
.content-area {
border: 1px solid black;
margin-top: 10px;
padding: 10px;
}
.sample-show-hide {
transition: all linear 0.5s;
}
.sample-show-hide.ng-hide {
opacity: 0;
}
********************************************animation.css***************************************************
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-animate-ng-show-production</title>
<link href="animations.css" rel="stylesheet" type="text/css">
<script src="//code.angularjs.org/snapshot/angular.min.js"></script>
<script src="//code.angularjs.org/snapshot/angular-animate.js"></script>
</head>
<body ng-app="ngAnimate">
<div ng-init="checked = true">
<label>
<input type="checkbox" ng-model="checked" />
Is visible
</label>
<div class="content-area sample-show-hide" ng-show="checked">
Content...
</div>
</div>
</body>
</html>
<!--
Copyright 2019 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
******************************************INDEX.HTML*****************************************************
********************************************animation.css***************************************************
.content-area {
border: 1px solid black;
margin-top: 10px;
padding: 10px;
}
.sample-show-hide {
transition: all linear 0.5s;
}
.sample-show-hide.ng-hide {
opacity: 0;
}
********************************************animation.css***************************************************
Comments
Post a Comment