Angular 2 By Example

Discover everything you need to know to build your own Angular 2 applications the hands-on way

Angular 2 By Example

Chandermani Arora, Kevin Hennessy

5 customer reviews
Discover everything you need to know to build your own Angular 2 applications the hands-on way
Mapt Subscription
FREE
$20.83/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$20.83p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785887192
Paperback510 pages

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.

Table of Contents

Chapter 1: Getting Started
Angular basics
The customary Hello Angular app - Guess the Number!
Digging deeper
Revisiting our app
Looking at how our code handles updates
Maintaining the state
Initializing the app
Tools
Resources
Summary
Chapter 2: Building Our First App - 7 Minute Workout
What is 7 Minute Workout?
Downloading the code base
Setting up the build
Organizing code
The 7 Minute Workout model
App bootstrapping
Our first component - WorkoutRunnerComponent
Building the 7 Minute Workout view
Exploring Angular modules
Learning more about an exercise
Summary
Chapter 3: More Angular 2 – SPA, Routing, and Data Flows in Depth
Exploring Single Page Application capabilities
Angular dependency injection
Tracking workout history
Fixing the video playback experience
Cross-component communication using Angular events
Summary
Chapter 4: Personal Trainer
The Personal Trainer app - the problem scope
Personal Trainer requirements
The Personal Trainer model
Sharing the workout model
The model as a service
The Personal Trainer layout
Personal Trainer navigation with routes
Implementing workout and exercise lists
Building a workout
Angular forms
Summary
Chapter 5: Supporting Server Data Persistence
Angular and server interactions
The basics of the HTTP module
Personal Trainer and server integration
Updating the router guards
Performing CRUD on exercises/workouts
Using promises for HTTP requests
The async pipe
Cross-domain access and Angular
Fixing the 7 Minute Workout app
Summary
Chapter 6: Angular 2 Directives in Depth
Classifying directives
Building a remote validator directive
Building a busy indicator directive
Directive injection
Building an Ajax button component
Dependency injection using viewProvider
Understanding structural directives
Component styling and view encapsulation
Summary
Chapter 7: Testing Personal Trainer
The need for automation
Testing in Angular
Getting started with unit testing
Getting started with E2E testing
Summary
Chapter 8: Some Practical Scenarios
Building a new app
Seed projects
Seed and scaffolding tools
Angular 2 performance
Handling authentication and authorization
Migrating Angular 1 apps
Migrating Angular 1's Personal Trainer
Summary

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

Authors

Table of Contents

Chapter 1: Getting Started
Angular basics
The customary Hello Angular app - Guess the Number!
Digging deeper
Revisiting our app
Looking at how our code handles updates
Maintaining the state
Initializing the app
Tools
Resources
Summary
Chapter 2: Building Our First App - 7 Minute Workout
What is 7 Minute Workout?
Downloading the code base
Setting up the build
Organizing code
The 7 Minute Workout model
App bootstrapping
Our first component - WorkoutRunnerComponent
Building the 7 Minute Workout view
Exploring Angular modules
Learning more about an exercise
Summary
Chapter 3: More Angular 2 – SPA, Routing, and Data Flows in Depth
Exploring Single Page Application capabilities
Angular dependency injection
Tracking workout history
Fixing the video playback experience
Cross-component communication using Angular events
Summary
Chapter 4: Personal Trainer
The Personal Trainer app - the problem scope
Personal Trainer requirements
The Personal Trainer model
Sharing the workout model
The model as a service
The Personal Trainer layout
Personal Trainer navigation with routes
Implementing workout and exercise lists
Building a workout
Angular forms
Summary
Chapter 5: Supporting Server Data Persistence
Angular and server interactions
The basics of the HTTP module
Personal Trainer and server integration
Updating the router guards
Performing CRUD on exercises/workouts
Using promises for HTTP requests
The async pipe
Cross-domain access and Angular
Fixing the 7 Minute Workout app
Summary
Chapter 6: Angular 2 Directives in Depth
Classifying directives
Building a remote validator directive
Building a busy indicator directive
Directive injection
Building an Ajax button component
Dependency injection using viewProvider
Understanding structural directives
Component styling and view encapsulation
Summary
Chapter 7: Testing Personal Trainer
The need for automation
Testing in Angular
Getting started with unit testing
Getting started with E2E testing
Summary
Chapter 8: Some Practical Scenarios
Building a new app
Seed projects
Seed and scaffolding tools
Angular 2 performance
Handling authentication and authorization
Migrating Angular 1 apps
Migrating Angular 1's Personal Trainer
Summary

Book Details

ISBN 139781785887192
Paperback510 pages
Read More
From 5 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00
AngularJS UI Development Book Cover
AngularJS UI Development
$ 26.99
$ 18.90
AngularJS Web Application Development Cookbook Book Cover
AngularJS Web Application Development Cookbook
$ 29.99
$ 6.00
Learning Web Development with Bootstrap and AngularJS Book Cover
Learning Web Development with Bootstrap and AngularJS
$ 39.99
$ 28.00
AngularJS by Example Book Cover
AngularJS by Example
$ 24.99
$ 17.50