Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Tuesday, March 1, 2016

TP102-AngularJS Directives

.

<html>

  <head>
    <title>AngularJS Directives</title>
  </head>

  <body>
    <h1>Sample Application</h1>

    <div ng-app="" ng-init="countries = [{locale:'en-US',name:'United States'}, {locale:'en-GB',name:'United Kingdom'}, {locale:'en-FR',name:'France'}]">
      <p>Enter your Name: <input type="text" ng-model="name"></p>
      <p>Hello <span ng-bind="name"></span>!</p>
      <p>List of Countries with locale:</p>

      <ol>
        <li ng-repeat="country in countries">
          {{ 'Country: ' + country.name + ', Locale: ' + country.locale }}
        </li>
      </ol>
    </div>

    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>

  </body>

</html>




ref: https://www.tutorialspoint.com/angularjs/angularjs_directives.htm

201603

TP101-Introduction To AngularJS


<!doctype html>
<html ng-app>

  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
  </head>

  <body>
    <div>
      <label>Name:</label>
      <input type="text" ng-model="yourName" placeholder="Enter a name here">
      <hr />

      <h1>Hello {{yourName}}!</h1>
    </div>

  </body>

</html>



ref: https://www.tutorialspoint.com/angularjs/index.htm .

201603