Wednesday, July 20, 2016

AngularJS Numbers

ng-init using in Angular JS

Example:


<html >
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

</head>
<body>

<div ng-app="">

<div ng-app="" ng-init="a=5;b=5">

<p>Total: {{ a * b }}</p>

</div>

</div>
</body>
</html>

Result:
Total:25

No comments:

Post a Comment