Last active
December 30, 2015 18:19
-
-
Save congjf/7866516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AngularJS ngShow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app> | |
<head> | |
<script src="http://code.angularjs.org/1.2.4/angular.min.js"></script> | |
<script src="http://code.angularjs.org/1.2.4/angular-animate.min.js"></script> | |
</head> | |
<body> | |
Click me: <input type="checkbox" ng-model="checked"><br/> | |
<div> | |
Show: | |
<div class="check-element animate-show" ng-show="checked"> | |
<span class="icon-thumbs-up"></span> I show up when your checkbox is checked. | |
</div> | |
</div> | |
<div> | |
Hide: | |
<div class="check-element animate-show" ng-hide="checked"> | |
<span class="icon-thumbs-down"></span> I hide when your checkbox is checked. | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment