Build Your Own AngularJS

Know Your AngularJS Inside Out

AngularJS is a powerful JavaScript framework. It can also be difficult to grasp fully. As a result, many struggle to capture all the benefits Angular has to offer.

Build Your Own AngularJS helps you understand everything there is to understand about Angular. By creating your very own implementation of Angular piece by piece, you gain deep insight into what makes this framework tick. Say goodbye to fixing problems by trial and error and hello to reasoning your way through them.

Get eBook $30-$39*

DRM-free PDF, epub, mobi, 1000+ Pages

Build Your Own AngularJS
Build Your Own AngularJS

Build Your Own AngularJS

“Don’t code blindfolded. Attempting to build an application you don’t fully understand, or to use a technology you aren’t familiar with, is an invitation to be misled by coincidences.”

– Dave Thomas & Andy Hunt, Programming by Coincidence, from The Pragmatic Programmer.

What You Will Learn

This book will teach you the inner workings of AngularJS by guiding you through implementing your own version of the framework from the ground up.

Each feature is introduced by discussing what it's used for and why it's needed. The feature is then implemented step by step using test-driven development practices: By writing a failing test and then making it pass.

The six most important things you’ll learn

  1. How all the major components of AngularJS work. Whether it's scopes, data binding, filters, directives, or dependency injection, you will learn not only how to use it, but also how it's actually implemented.
  2. How an Angular application holds together. The book will demystify the mechanics of how and when different parts of your application are created and destroyed, as well as how they're connected with each other.
  3. The performance characteristics of AngularJS. When you know how your framework is implemented, you know what it can and cannot do efficiently. You'll also know where to look when facing performance problems.
  4. How to extend AngularJS. You'll learn all the extension points of Angular and how to use them.
  5. How to write test-driven JavaScript. By using TDD to build your own implementation of Angular, you'll get into the flow of writing JavaScript code in a test-driven fashion.
  6. How to create and maintain a substantial JavaScript codebase. How to organize code, and how to manage it with a modern toolset built on NPM, Browserify, and Jasmine.

Table of Contents

See the full table of contents and version history

  • Introduction
    • 0. Project Setup
  • Part 1: Scopes
    • 1. Scopes And Digest
    • 2. Scope Methods
    • 3. Scope Inheritance
    • 4. Watching Collections
    • 5. Scope Events
  • Part 2: Expressions And Filters
    • 6. Literal Expressions
    • 7. Lookup And Function Call Expressions
    • 8. Operator Expressions
    • 9. Filters
    • 10. Expressions And Watches
  • Part 3: Modules And Dependency Injection
    • 11. Modules And The Injector
    • 12. Providers
    • 13. High-Level DI Features
  • Part 4: Utilities
    • 14. Promises
    • 15. $http
  • Part 5: Directives
    • 16. DOM Compilation and Basic Directives
    • 17. Directive Attributes
    • 18. Directive Linking and Scopes
    • 19. Controllers
    • 20. Directive Templates
    • 21. Directive Transclusion
    • 22. Interpolation
    • 23. Components
    • 24. Bootstrapping Angular

About The Author

Tero Parviainen is an independent software developer who has been creating web applications professionally for over 14 years.

Tero is currently focusing on frontend web development in JavaScript and HTML5. He also has substantial experience in technologies like Java, Ruby, and Clojure.

Tero is the author of Real-time Web Application Development using Vert.x 2.0. He is active in the Clojure community, organizing events such as the Clojure Cup, and some Clojure user group activities in Finland.

Tero can be found online on Twitter, GitHub, and LinkedIn. He also blogs at teropa.info.

Get eBook
$30-$39*

Build Your Own AngularJS

FAQ

Who is this book for?

The book is aimed at working programmers who either want to learn AngularJS or have already done something with AngularJS but want to take their skills to the next level.

A basic grasp of the JavaScript language is expected, but you don't have to be a JavaScript expert.

In what formats can I get the book?

The book is provided as a DRM-free PDF document, and in the epub and mobi ebook formats.

What does $30-$39 mean? What is the price I will pay?

The tax-free price of the book is $30. This is what you'll pay if you're outside the European Union, or if you're buying the book for a business with a VAT ID within the EU.

Consumers within the European Union will have an additional VAT added to the list price. The amount depends on your home country (18% - 27%). These rates and rules are based on EU regulations, effective 1.1.2015.

You will see your final amount payable at checkout after you have entered your contact information.

Can I get my money back if I'm not happy with the book?

Certainly. Get in touch within 30 days of your purchase and I'll issue a full refund.

Why would I want my own implementation of AngularJS?

You wouldn't. Not for building your applications on, anyway. The reason for implementing Angular from the ground up is that it's the absolute best method I know of for learning how it works.

That said, if you're looking to steal the best ideas from Angular to your own framework, this book will help you do exactly that. Just dig into the portions where your favorite features are implemented.

Is it really a full implementation of AngularJS?

For all intents and purposes, yes. The aim is to get to feature parity with the core features of the official Angular implementation. We may omit some browser hacks and other such corner cases, but never without explicitly mentioning the omission.

However, we will not reproduce the code exactly as it is in the Angular codebase. We will from time to time choose code clarity over raw performance, for example. So while your Angular implementation will match the features of the original Angular, it will not be a line-by-line clone of it.

Which version of AngularJS is the book targeting?

We are tracking the latest development versions of Angular 1.x. Currently the content is up to date with Angular 1.5.

This book does not cover Angular 2.

Got a question?

Send me an email or tweet.

Get eBook
$30-$39*

*) The tax-free price of the book is $30. This is what you'll pay if you're outside the European Union, or if you're buying for a business with a VAT ID within the EU. Consumers within the European Union will have an additional VAT added to the list price. The amount depends on your home country (18% - 27%). These rates and rules are based on EU regulations, effective 1.1.2015.

You will see your final amount at checkout after you have entered your contact information.