(PCC)::[How-to-use-AngularJS-Directives]::[angularjs]
<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> <div ng-app="" ng-init="firstName='John'"> <p>Input something in the input box:</p> <p>Name: <input type="text" ng-model="firstName"></p> <p>You wrote: {{ firstName }}</p> </div> </body> </html>
Input something in the input box:
Name:
You wrote: {{ firstName }}