Essential Angular

Book description

Essential Angular is a concise, complete overview of the key aspects of Angular, written by two Angular core contributors. The book covers the framework's mental model, its API, and the design principles behind it. It is fully up to date with the latest release of Angular.

About This Book

  • Written by two Angular core contributors
  • A complete overview of the key aspects of Angular
  • Up to date with the latest Angular release

Who This Book Is For

To get the most from this book, you should already have a good understanding of Angular and general web development. The book dives quickly into the core Angular systems without stepping through the basics.

What You Will Learn

  • Understand why and how to use JIT and AOT compilation in Angular
  • Bootstrap and inject NgModules
  • Learn about the component lifecycle
  • Understand the two phases of Change Detection
  • Visualize and parse the Injector tree
  • Understand advanced Lazy Loading
  • Integrate and run different testing strategies on your code

In Detail

Essential Angular is a concise, complete overview of the key aspects of Angular, written by two Angular core contributors. The book covers the framework's mental model, its API, and the design principles behind it. This book is fully up to date with the latest release of Angular.

Essential Angular gives you a strong foundation in the core Angular technology. It will help you put all the concepts into the right places so you will have a good understanding of why the framework is the way it is. Read this book after you have toyed around with the framework, but before you embark on writing your first serious Angular application.

This book covers concepts such as the differences between Just-In-Time (JIT) and Ahead-Of-Time (AOT) compilation in Angular, alongside NgModules, components and directives. It also goes into detail on Dependency Injection and Change Detection: essential skills for Angular developers to master. The book finishes with a look at testing, and how to integrate different testing methodologies in your Angular code.

Style and approach

Essential Angular is a complete overview of the key aspects of the latest release of Angular, written by two core Angular contributors. It goes far beyond a how-to-get-started guide and dives into the most important topics in modern Angular development at depth.

Table of contents

  1. Preface
    1. Who this book is for
    2. Conventions
    3. Reader feedback
    4. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Example
  3. Compilation
    1. JIT and AOT
    2. Why would I want to do it?
    3. How is it possible?
    4. Trade-offs
    5. Let's recap
  4. NgModules
    1. Bootstrap and entry components
      1. Summary
    2. Providers
    3. Injecting NgModules and module initialization
    4. Bootstrap
    5. Lazy loading
    6. Let's recap
  5. Components and Directives
    1. Input and output properties
    2. Template
    3. Life cycle
    4. Providers
    5. Host element
    6. Queries
    7. Let's recap
    8. What about directives?
  6. Templates
    1. Why templates?
      1. Swapping implementations
      2. Analyzing templates
      3. Transforming templates
      4. Separating dynamic and static parts
      5. Building on existing technologies and communities
    2. Angular templates
      1. Property and event bindings
        1. Two-way bindings
      2. Interpolation
      3. Passing constants
      4. References
      5. Templates and *
    3. Let's recap
  7. Dependency Injection
    1. Registering providers
    2. Injector tree
    3. Resolution
    4. Lazy loading
    5. Getting injector
    6. Visualizing injector tree
    7. Advanced topics
      1. Optional dependencies
      2. More on registering providers
      3. Aliasing
      4. Overrides
    8. Let's recap
  8. Change Detection
    1. Why?
      1. Predictability
      2. Performance
    2. How does Angular enforce It?
    3. Content and view children
    4. ChangeDetectionStrategy.OnPush
    5. Let's recap
  9. Forms
    1. Two modules
    2. High-level overview
      1. App model
      2. Form model
      3. Form directives
      4. DOM
    3. Form model
      1. FormControl
      2. FormGroup
      3. FormArray
      4. Updating form model
      5. Disabling form model
      6. Async validations
      7. Composing validators
      8. Listening to changes
      9. Power of RxJS
      10. Why form model?
    4. Form directives
      1. ReactiveFormsModule
      2. FormsModule
      3. Accessing form model when using FormsModule
    5. The DOM
    6. Wrapping up
  10. Testing
    1. Isolated tests
    2. Shallow testing
    3. Integration testing
    4. Protractor tests
    5. Let's recap
  11. Reactive Programming in Angular
    1. Reactive programming in the Angular ecosystem
      1. @angular/forms
      2. @angular/router
    2. Summary

Product information

  • Title: Essential Angular
  • Author(s): Victor Savkin, Jeff Cross
  • Release date: May 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781788293761