Book Image

Mastering JavaScript Promises

Book Image

Mastering JavaScript Promises

Overview of this book

Table of Contents (16 chapters)
Mastering JavaScript Promises
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating your first Angular.js file


We will use the downloaded file to include it in our HTML. From there, it will show its magic on how Angular.js is a two-way banded framework and show the results in real time.

Step 1 – create the HTML 5 doc

Create a file like this:

<html>
<head>
  <title></title>
</head>
<body>

</body>
</html>

Step 2 – add the JavaScript file to it

Create a JavaScript file with the following code:

<html>
<head>
  <title> OPD System</title>
  <script type="text/javascript" src='angular.min.js' ></script>
</head>
<body> </body>

Add the Angular.js directive in the preceding code:

<html ng-app >
<head>
  <title>OPD System</title>
  <script type="text/javascript" src='angular.min.js' ></script>
</head>
<body>
</body>

That's it; you now have a working Angular.js file for further use.