AngularJS Essentials

Today, I have taken some time off to talk about a book of a very popular JavaScript framework called AngularJS. The book “AngularJS Essentials” talks about various details of the framework. Let’s check together what we find in the next eight chapters.

Chapter 1: Getting Started with AngularJS

This chapter starts with architectural concepts and setting up the framework. But what I like most is the ‘Organizing the code’ section. It talks about different code organising approaches and personally I like ‘The specific style’ and ‘The domain style’. These approaches are very useful in an enterprise application development where many team members are involved.

Chapter 2: Creating Reusable Components with Directives

This chapter talks about in-built AngularJS directives first and then will introduce you to write your own custom directives. In every example author has deleted the variable from the scope at the end of the controller. I found this is missing in many other books. He concludes the chapter with animation examples.

Chapter 3: Data Binding

You will learn how to handle data in AngularJS using expressions, filters, and forms validation. Simple examples will clarify each of the concepts.

Chapter 4: Dependency Injection and Services

Dependency Injection is one of the fundamental part of AngularJS. Further, author talks about caching and intercepters.

I like the following discussions in this chapter:

  • Different ways to create service.
  • Explaining the JavaScript Reveal Module Pattern since the factory function returns a new object
  • How creating a service using factory function is different than using a service function
  • Intercepter
  • Resolving promises by means of the resolve property, defined inside the when function of the $routeProvider function
  • Use of deferred API using $q.defer()

JavaScript Promise is one of my favourite topic and have given presentation on it at JSChannel-Bengaluru recently.(

You can check my presentation and code examples.


Code Examples:

Chapter 5: Scope

Discussion about scope should have been done much earlier. Though, the highlight of the chapter is ‘Best practices using the scope’. 

Chapter 6: Modules

While explaining modules and how to use it for modular development, in one place grunt-html-to-js plugin is mentioned. It is a useful plug-in for converting AngularJS templates to JavaScript.

Chapter 7: Unit Testing

Unit Testing is one my favourite topic along with JavaScript promises. Author has explained how to write Jasmine specs for each of AngularJS components.

For automating your tests, author has discussed about the use of Karma. He has shown how to install, configure, start and run it. You should also install karma-cli node package using the following command after installing karma:

npm install -g karma-cli

Last April, 2014, I gave a session on ‘Unit testing AngularJS using Jasmine and Karma’ at JSChannel-Bengaluru ( ).


Code Examples:

Further, you can check the following link in my blog:

Chapter 8: Automating the Workflow

The final chapter of the book talks in details about Grunt for automating the workflow. If you have not used it before, then also this chapter will give you a fair idea to get you going. The concluding discussion of this chapter is managing packages with Bower which allows us to easily find, install, update, and remove any package from the application.

You can check the below mentioned link for another reference:

Overall, the book is easy to follow, concepts are well explained in shorter version and hence is a recommended book for novice to intermediate level developers interested in AngularJS.

Book Link:

19 thoughts on “AngularJS Essentials

  1. I have not checked in here for some time as I thought it was getting boring, but the last several posts are good quality so I guess I will add you back to my everyday bloglist. You deserve it my friend :)

  2. I don’t even know the way I stopped up right here, but I believed this publish used to be great. I do not know who you’re however certainly you are going to a famous blogger if you happen to are not already ;) Cheers!

  3. I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the internet will be much more useful than ever before.

  4. My brother recommended I would possibly like this web site. He was totally right. This post truly made my day. You cann’t imagine simply how much time I had spent for this information! Thank you!

Add Comment Register

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">