I need to show and hide a div. I do it by putting true of false values into the ng-show and ng-hide. I have load this page using ng-include
<body ng-app="myApp" ng-controller="FirstCtrl">
<div ng-include="home.html">
</div>
</body>
My home.html
<div ng-controller="SubCateCtrl" ng-init="activediv='true'">
<div class="bcreamb" >
<a style="" href="#" ng-click="activediv='true'">View</a> <a ng-click="activediv='false'" href="#">Add</a>
</div>
<div ng-show="activediv">
<h1>
View</h1>
</div>
<div ng-hide="activediv">
<h1>
Add</h1>
</div>
</div>
For first click Working fine with add button. If I click view button not removing class="ng-hide" from Add div. it shows like as follows. activediv = false.
<div ng-hide="activediv" class="ng-hide">