Angular 2 By Example

Chandermani Arora, Kevin Hennessy



Key Features

  • Master the Angular way to structure, build, deploy, and test your code
  • Understand Angular 2’s new component-based architecture
  • Build a game and workout runner apps on the Angular platform

Book Description

Angular 2 will help you build faster, more efficient, and more flexible cross-platform applications. Angular 2 is known for taking the pain out of JavaScript development, and enabling more organized, readable, and testable code.

This book builds three apps with varying degrees of complexity. It starts with a simple ‘Guess the Number’ game, which serves as a platform to launch you into the world of Angular. Next, you will learn to construct a popular ‘7-Minute Workout’ app, covering the building blocks of Angular. The final app, ‘Personal Trainer’ morphs the existing ‘7-Minute Workout’ into a full-fledged personal workout builder and runner, covering advanced directive building, which is the most fundamental and powerful feature of Angular.

In addition to this, you will learn about testability and the framework constructs Angular provides to effectively test your app. The book concludes by providing you with practical advice and useful tips that will come in handy as you build more and more apps with Angular.

What you will learn

  • Design, develop, deploy, and test the apps you build
  • Work your way through every aspect of app development using Angular2
  • Understand the inner workings of Angular’s view templating and data-binding capabilities
  • Work on HTML forms and learn the Angular way to bind, validate, and format data
  • Create component, structural, and attribute directives to extend standard HTML behavior
  • Integrate with the server backend and find out about data retrieval and persistence using Angular
  • Gain practical insight into the challenges of building apps using Angular as well as their solutions

About the Author

Chandermani Arora is a software craftsman, with a passion for technology and expertise on the web stack.

With more than a decade of experience under his belt, he has architected, designed, and developed solutions of all shapes and sizes on the Microsoft platform.

He has been building apps on Angular 1 from its early days. Such is his love for the framework that every engagement that he is a part of has an Angular footprint.

Being an early adopter of the Angular 2 framework, he tries to support the platform in every possible way – be it writing blog posts on various Angular topics or helping his fellow developers on StackOverflow, where he is often seen answering questions on the Angular2 channel.

An ex-MSFT, he now works for Technovert where he leads a bunch of awesome developers who build cloud-scale web applications using Angular and other new age frameworks.

He is also the author for the first edition of this book, AngularJS by Example.

Kevin Hennessy is a Senior Software Engineer with Applied Information Sciences. He has 18 years of experience as a developer, team lead, and solutions architect, working on web-based projects, primarily using the Microsoft technology stack. Over the last several years, he has presented and written about single-page applications and JavaScript frameworks, including Knockout, Meteor, and Angular 2. Most recently, he spoke about Angular 2 at the All Things Open Conference. His corporate blog is

Table of Contents

  1. Getting Started
  2. Building Our First App - 7 Minute Workout
  3. More Angular 2 – SPA, Routing, and Data Flows in Depth
  4. Personal Trainer
  5. Supporting Server Data Persistence
  6. Angular 2 Directives in Depth
  7. Testing Personal Trainer
  8. Some Practical Scenarios