In the past, Drupal has only shipped with jQuery and a few jQuery plugins used by Drupal core for the JavaScript API. This has changed with Drupal 8. Underscore.js and Backbone.js are now included in Drupal, bringing two popular JavaScript frameworks to its developers.
However, there are many JavaScript frameworks that can be used. In Chapter 5, Frontend for the Win, we covered the asset management system and libraries. In this recipe, we will create a module that provides Angular.js as a library and a custom Angular application; the demo is available on the AngularJS home page.
In this example, we will use Bower to manage our third-party Angular.js
library components. If you are not familiar with Bower, it is simply a package manager for frontend components. Instead of using Bower, you can just manually download and place the required files.
If you do not have Bower, you can follow the instructions to install it from bower...