<!DOCTYPE html>
<html>
<head>
<meta chrset=”UTF 8″>
<title>Button Click Hide</title>
</head>
<body>
<script src=”https://code.angularjs.org/1.6.9/angular.js”></script>
<script src=”https://code.jquery.com/jquery-3.3.1.min.js”></script>
<div ng-app=”buttonDemo” ng-controller=”buttonDemoController”>
<button ng-click=”hideTag()”>Hide IntervieBit</button>
<div ng-hide=”hideFlag”>InterviewBit</div>
</div>
<script type=”text/javascript”>
var app = angular.module(‘buttonDemo’,[]);
app.controller(‘buttonDemoController’,function($scope){
$scope.hideFlag = false;
$scope.hideTag = function(){
$scope.hideFlag = true;
}
});
</script>
</body>
</html>
Post Views: 48