<div ng-app="payrollApp" ng-controller="employeeController">
<button ng-click="toggle()">Toggle</button>
<p ng-hide="isVisible">
Name:
<input type="text" ng-model="Name">
<br>
</p>
</div>
<script>
var app = angular.module('payrollApp', []);
app.controller('employeeController', function($scope) {
$scope.Name = "David"
$scope.isVisible = false;
$scope.toggle = function() {
$scope.isVisible = !$scope.isVisible;
};
});
</script>