|
Calculate Total: Quantity: Price: Total: {{qty * price | currency}} |
|
|
|
Update text fields. First Name:
Last Name: Full Name: {{firstName + lastName}} |
<!doctype html> <br/><html lang="en"> <br/><head> <br/> <meta charset="utf-8"> <br/> <br/> <script src="../js/angular.min.js"></script> <br/></head> <br/><body > <br/> <div ng-app ng-init="qty=5;price=2.5"> <br/> <b>Calculate Total:</b> <br/> <div> <br/> Quantity: <input type="number" min="0" ng-model="qty"> <br/> </div> <br/> <div> <br/> Price: <input type="number" min="0" ng-model="price"> <br/> </div> <br/> <div> <br/> <b>Total:</b> {{qty * price | currency}} <br/> </div> <br/></div> <br/></body></html>
<!DOCTYPE html> <br/><html> <br/><script src="../js/angular.min.js"></script> <br/><body> <br/><div ng-app=""> <br/> <p>Name: <br/><input type="text" ng-model="companyName"></p> <br/> <p>{{companyName}}</p> <br/></div> <br/></body> <br/></html> |
|
<!DOCTYPE html> <br/><html> <br/><script src= "../js/angular.min.js"></script> <br/><body> <br/><p>Update text fields.</p> <br/><div ng-app="myApp" ng-controller="myCtrl"> <br/>First Name: <input type="text" ng-model="firstName"><br> <br/>Last Name: <input type="text" ng-model="lastName"><br> <br/><br> <br/>Full Name: {{firstName + lastName}} <br/></div> <br/><script> <br/>var app = angular.module('myApp', []); <br/>app.controller('myCtrl', function($scope) { <br/> $scope.firstName= "John"; <br/> $scope.lastName= "Doe"; <br/>}); <br/></script> <br/></body></html> <br/> |
Update text fields. First Name:
Last Name: Full Name: {{firstName + lastName}} |