<!DOCTYPE html>
<html lang="en">
<head>
<title>Angular Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"></script>
<script>document.write('<base href="' + document.location + '" />');</script>
<script >
var myApp = angular.module("AngularApp",['ngRoute']);
myApp.controller('exampleController', function($scope) {
$scope.textVal = "";
$scope.isOK = function (param) {
if(param == "show")
{
return true
}
else if(param =="hide")
{
return false
}
else
{
return false;
}
}
});
</script>
</head>
<body ng-app="AngularApp">
<div ng-controller="exampleController">
<label>Please enter show and hide to show hide the element below : </label><input ng-model = "textVal">
<div ng-show="isOK(textVal)">The Div is displaying now</div>
</div>
</body>
</html>
// Code goes here
/* Styles go here */