Drupal 8 and AngularJS are two cutting edge technologies that can work effectively together to allow creation of web applications and effective dynamic data views.
1. What is AngularJS?
2. Where can AngularJS be used?
Non-technically speaking, AngularJS is used to build web applications. Anything that presents data and manipulates data. Lists of names and items, store products, dynamic widgets, smart form controls, miscellaneous interactive elements.
AngularJS is a powerful extension of AJAX. You probably have heard of AJAX already. Some 10 years ago, AJAX was a significant breakthrough in web technology, allowing the web browser to exchange data with the server without doing a page reload. That was the first significant step in turning a web browser into a web app platform. There was one problem though. AJAX requests were hard to implement in a controlled way and binding them to the browser DOM elements also meant a lot of meticulous work. Now, AngularJS has built on that technology, making AJAX and it’s data bindings powerful and seamless.
Some powerful use cases are listed at the Buildwith web site.
4. How can AngularJS be used with Drupal?
AngularJS can be used with Drupal in a variety of ways. In web shops and web carts, where setting product options can calculate price in real-time. In all kinds of listings, like news listings, person databases, ticket systems. It can be used for live filtering of data. For all kinds of live update widgets, live weather widgets and various real-time tracking. And, of course, a sweet role with the smart forms, that evaluate values and adapt in real-time without having to reload the page.
With the Drupal 8’s built-in services support, AngularJS comes a very handy and helpful, and a promising companion.
5. A working sample module.
AngularJS can be daunting initially. It was for me. As I was making my first steps, and trying to make it work with Drupal 8, I have written a small module, containing a few samples of usage. The module can be found at my github page. Install it, and then navigate to the /angulars page. Play with the code and the output on the page.
6. Coverage in Drupal related blogsphere.
There have been some interesting blog posts about Drupal and AngularJS: