The structure of the Angular.js document

Angular.js uses the HTML file at the base document for its implementation. Its syntax is very simple and easy to remember. The structure of the page is a simple HTML file with ng at its start. This is called the Angular.js directive and it can be used with HTML or can be linked as a individual document.

To start using Angular.js, you need to add a few lines and it will be up and running. For using Angular.js, perform the following steps:

  1. Add the ng directive; you only need to add this simple code to start using the Angular.js:
    <html ng-app="opdsys">
  2. Add the library to the file:
    <script type="text/JavaScript" src="js/lib/angular.min.js"></script>
  3. Now, define the variable within the HTML tag like this:
    <tr ng-repeat= ...

Get Mastering JavaScript Promises now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.