Introducing AngularJS
AngularJS is a popular and powerful JavaScript framework created by Google. AngularJS provides easily consumable abstractions on top of JavaScript to aid in the development of web applications. These abstractions include easy-to-use form validation, two-way data binding, custom HTML attributes called directives for dynamic data and rendering, a simple interface for XMLHttpRequest (XHR), the ability to create custom directives, single page application routing, and more.
We are not going to cover the intricacies and the vastness of AngularJS, but we will learn how to leverage AngularJS's built-in directives, how to create custom directives and services, and how to use AngularJS's XHR interface.
First, let's add AngularJS to our project.
Setting up AngularJS
The AngularJS team maintains a Bower package with the latest release. Let's install AngularJS. We are going to use version 1.4.8 of AngularJS:
- In the terminal, from the
src
directory, run:bower...