标签:
ng-disable指令的应用:
<button ng-disabled="mySwitch">click me</button> <input type="checkbox" ng-model="mySwitch"> {{ mySwitch}} </div>
ng-show指令的应用:
<div ng-app="myApp"> <div ng-show="true">可见</div> <div ng-show="false">不可见</div> </div> <div ng-app="myApp" ng-init="hour=14"> <div ng-show="hour>12">可见</div> </div>
ng-hide指令的应用:
<div ng-app="myApp"> <div ng-hide="true">不可见</div> <div ng-hide="false">可见</div> </div> <div ng-app="myApp" ng-init="hour=4"> <div ng-hide="hour>8">可见</div> </div>
摘录自runoob.com。旨在通过自己的语言加深对AngularJS的学习、理解和记忆。
标签:
原文地址:http://www.cnblogs.com/professional-NET/p/5005914.html