We have a checkbox to hide show the textbox. The textbox will show when the checkbox is checked and if we un-check the checkbox then the value of isChecked variable is false and if we assign false value to the ng-show directive it will hide the div tag.

<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> </head> <body ng-app="Demo"> <div class="row" ng-controller="myController"> <span class="col-md-3"> <span>Hide/Show</span> <input type="checkbox" ng-model="isChecked" /> </span> <div class="col-md-9" ng-show="isChecked"> <input type="text" style="width:300px;" class="form-control" /> </div> </div> <script type="text/javascript"> var demo = angular.module("Demo", []); demo.controller("myController", function ($scope) { $scope.isChecked = true; }); </script> </body> </html>