Programming Examples
AngularJS Program to find the Simple Interest
Write a AngularJS Program which accept the Principal Amount, Rate, Time from user and Find the Simple Interest.Â
Solution
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<div ng-app="">
<table cellpadding="3px" align="center" style="border:2px solid red;padding:10px;border-radius:20px;">
<tr>
<th colspan="2">Simple Interest Calculator</th>
</tr>
<tr>
<td>Principle Amount</td>
<td><input type="text" ng-model="pa"></td>
</tr>
<tr>
<td>Rate of Interest</td>
<td><input type="text" ng-model="rate"></td>
</tr>
<tr>
<td>Time</td>
<td><input type="text" ng-model="time"></td>
</tr>
<tr>
<td>Simple Interest</td>
<td><h4>{{((pa*rate*time)/100)}}</h4></td>
</tr>
</table>
</div>
</body>
</html>
Output/ Explanation:
Check Live :Â https://programmingtrick.com/angular-assignment/simple-interest.html