Programming Steps
Step-By-Step Programming For Beginners
Thursday, March 3, 2016
w3s106-AngularJS Directives Data Binding
w3s106-AngularJS Directives Data Binding
code example:
index.html
<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/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>
https://www.w3schools.com/angular/angular_directives.asp
201603
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment