Programming Code Center(PCC)
[ANGULARJS]

(PCC)::[How-to-use-The-ng-model-Directive-in-AngularJS]::[angularjs]

File Name : index.html

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>

<div data-ng-app="" data-ng-init="quantity=1;price=5">

<h2>Cost Calculator</h2>

Quantity: <input type="number" ng-model="quantity">
Price: <input type="number" ng-model="price">

<p><b>Total in dollar:</b> {{quantity * price}}</p>

</div>

</body>
</html>

Output :

Cost Calculator

Quantity: Price:

Total in dollar: {{quantity * price}}