Ng-App-6

 

Another example of Ng-App where we are initializing the values in ng-init and empty ng-app but everything work just perfectly. See the code

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body> <div ng-app="" ng-init="qt=3;rt=50"> <br /> Quantity: <input type="number" ng-model="qt"><br /> Costs: <input type="number" ng-model="rt"><br /> Total : {{ qt * rt }} </div> </body> </html>
Output