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

No comments:

Post a Comment