The ng-init directive used for initializing variables in AngularJs application. For example if you execute the  AngularJS Expression example2, for the first time you will get Multiplication of Num1 and Num2 as  NaN in the output. Since initially there is no data in first and second input boxes.

We can assign initial values into variables in AngularJs using ng-init directive. For example if you execute the following sample code you will get Multiplication of Num1 and Num2 is:0 as the value.

Note: you can initialize multiple AngularJs variables using using semicolon separated list.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
</head>

<body>

<div ng-app="" ng-init="num1='0';num2='0'">
  Enter Num1:<input type="text" ng-model="num1">
  Enter Num2 : <input type="text" ng-model="num2">
  <p>Multiplication of Num1 and Num2 is: {{ num1 * num2 }}</p>
</div>

</body>
</html>
Note: In the above sample we can use ng-bind in place of expression. Refer the following code for the sample. Note: ng-init directive can be used any where in the angularJS application.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
</head>

<body>

<div ng-app="" ng-init="num1='0';num2='0'">
  Enter Num1:<input type="text" ng-model="num1">
  Enter Num2 : <input type="text" ng-model="num2"><br/>
  <p>Multiplication of Num1 and Num2 is: <label id="lbl1" ng-bind=" num1 * num2 "/></p>
</div>

</body>
</html>
Note: The same sample can be written using AngularJs Expressions. Use {{ fn + ' ' + ln }} in-place of