1.經過ng-click事件設置一箇中間變量click,再經過ng-hide和變量click來控制div顯示/隱藏app
<div ng-app="" ng-init="click=false">
<button ng-click="click= !click">隱藏/顯示</button>
<div ng-hide="click">
請輸入一個名字:<input type="text" ng-model="name" />
Hello <span ng-bind="name"></span>
</div>ide