15 Reasons We Love AngularJS And You Should Too

Author Avatar
Written by Digital Surgeons,
• 7 min read

If you've been coding at all recently, you've most likely come across Angular in your streams- and for good reason. While it's incredible that Google and a massive community of developers are already evangelizing it, we have another 15 reasons for loving AngularJS.

  1. Modular and component-driven. With AngularJS we can write and organize our code into “modules” which makes for cleaner, more flexible codebases. Gone are the days of massively confusing reams of jQuery spaghetti code; AngularJS brings organization and coding principles to keep things fast and maintainable.
  2. D.R.Y. and reusable code made easy! DRY or “don't repeat yourself” is an acronym that every developer should live by. Angular's modular nature makes it incredibly easy to write and reuse code. Frequently interfacing with various API's or find yourself rewriting similar functionality from project to project? Angular has your back.
  3. Two way data binding is legendary! When Angular first hit the news, two-way data binding was arguably one of the better known and exciting features of the framework. In typical MVC frameworks, we store data in the model and present it in the view. This is great for organization, however you soon end up with tons of boilerplate code for updating values in the model based on user interaction and in the view based on business logic. Angular saves developers so much time with it's free, built-in two-way data binding. In a nutshell, this means values in your view are tightly bound to the data source so that when a user interacts and updates a value, guess what, your model is updated too! You can see this in action on our ClickTackle Headline Generator.
  4. Directives FTW! Angular's directives are a blessing and developers around the internet have fallen in love. Angular is all about separation of concerns and provides an extremely powerful design pattern for interfacing with the DOM. All DOM manipulation should be performed in directives leaving controllers to business logic. Directives allow us to package up reusable chunks of DOM based code and initialize directly within HTML templates using data attributes and custom elements. Angular also comes with a heap of directives built in, including the ng-click directive that binds click events to a method within that elements scope. Another directive, the super powerful ng-repeat, will loop through an array in your model, duplicating the element it's attached to with the appropriate data for each item filled in.
  5. Services are pretty damn awesome! The concept behind Angular's services is to provide a mechanism for creating libraries and reusable classes that can be shared between controllers and directives alike. Factories (singletons), services (instantiable classes), values (simple injectable value) and constants (simple injectable values that cannot be changed) are all at the developers disposal. The makers of AngularJS also packed the framework full with a huge collection of core services, $http (AJAX), $resource (REST), and $location (routing) to name just a few.
  6. Dependency Injection. Dependency injection (DI) is an incredibly powerful thing. AngularJS (like our favorite PHP framework, Laravel) is based entirely around the concept of dependency injection. DI allows us to write code that depends on interfaces rather than hardcoded dependencies. It is the lifeblood of modularity, helping us stay DRY and allowing us to easily switch out a service to support a 3rd party platform change, API version, or even a logging implementation. Angular's enforcement of strict dependency injection also makes testing your code incredibly straightforward as services and dependencies can be swapped for mocks with ease.
  7. Testable Code! Testing has not really been a focal point of the JavaScript community until recently. Sure you could test, but it was difficult to set up and led to messy tests; messy tests are not reliable tests! Angular was built from the ground up with testing in mind and streamlines the whole process. Separation of concerns, dependency injection, mock libraries, and integration with unit testing tools like karma and jasmine make the testing story much more enjoyable and easier to get right.
  8. Scope that will make all the devs dance the jig. Let's face it, JavaScript makes it super easy to litter variables across your application, potentially trampling on other areas and third party bits of code. Not to mention a beginner's reaction when they first start to learn about JavaScript scope. Normally, a careful approach is required to isolate the variables you need in only one area from the rest of your application. Angular makes it easy to keep things isolated by providing an explicit scope mechanism for managing which parts of your application have access to what. It's a life saver!
  9. Write it how you want it! Other frameworks can dictate how your folder structure and models are handled, but with Angular you have the flexibility to organize the way you want. Does your team rely on RequireJS or Browserify? Use it! Just need to bang out a quick one-pager without complicating things? Throw it all in the same file! On the other hand, if you want structure for larger, more complex projects then notable developers like John Papa have put together style guides that can unify a diverse team on a project.
  10. Data Models are POJO. That's no marketing buzzword. When I say POJO, I mean that data models are plain old JavaScript objects and that means you don't need to load up on extra getter and setter functions or shoehorn your data into an unfamiliar model interface. All front end developers know JavaScript objects like the backs of their hands and many libraries like Underscore provide extremely powerful collection functions that “just work” with your Angular models.
  11. A robust and active community. Angular is fully open source, which allows it to be constantly driven forward by a thriving community of developers, featuring some of the internet’s front-end masters. From the time we push post on this article, hundreds more Github stars will be piling up. This encourages great UI development practices and pushes the framework, as well as the web, forward with new standards.
  12. Fantastic educational resources. Learning a new framework is no small task and reading through troves of documentation can often feel overwhelming. Luckily, there's plenty of great places to learn Angular like: egghead.io, learn-angular.org and of course the thousands of answered questions on Stack Overflow.
  13. Less coding, more functionality please. The view layer is the standard DOM (document object model) and since anyone with basic markup skills can understand the DOM, your designers and product team can follow along. In fact, it was this philosophy from which Angular was born. The framework was built with the idea of giving web designers the ability to “sprinkle magic” over their designs and layouts using what we now know as directives. Fast forward to the present day, and although Angular is a large robust application development framework, it's DOM based templating makes for easy collaboration between designers and developers alike.
  14. Routing. With AngularJS, binding views and their corresponding controllers to hashbang or pushstate URLs is as simple as can be. Using the ng-view directive you can load views into the DOM as a user navigates your application. Third party routers like ui-router add extra awesome functionality like nested routes, for even more power. Single page web apps have never been so easy.
  15. Angular 2.0. The Angular team is just getting started. Angular 2.0 has been announced and is close to completion. A complete re-write with performance at the forefront, tight integration with ES6, transpilers and a new partnership with Typescript prove that the Angular team is not finished with pushing web technology forward. We are as excited as the rest of the community for the launch of Angular 2.0.

Some brands we've helped push forward with Angular JS awesomeness already:

Still wondering why you should be embracing Angular? Interested in seeing how our forward-obsessed technologists are loving it? Let's talk.

Looking for an awesome gig? We're hiring.