The following code shows how to use
ng-if
with hardcoded value.
<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!-- www . j ava 2 s . c o m-->
<body>
<p ng-if="1 == 0">True</p>{{1==0}}
<h1 ng-if="1 == 1">True</h1>
</body>
</html>
The code above is rendered as follows: