You are previewing Developing an Angular 2 Edge.
O'Reilly logo
Developing an Angular 2 Edge

Book Description

This book is focused on demonstrating the key features of the Angular 2 framework. The book serves as a great starting point for newcomers as well as an examination of some more advanced features. By the end of the book you will have the knowledge required for developing a robust web application using Angular 2. You will also have an insight into application testing, a task too o?ften overlooked in the development process. We have created a chat and scheduling application using Angular 2 for the book. The entire application is openly available at https://github.com/flauc/angular2-edge-app.

Table of Contents

  1. Preface
    1. What is Angular 2?
      1. About the authors
  2. 1. Angular 2 Introduction
    1. AngularJS
    2. Angular 2
    3. Performance
    4. Ecosystem
    5. Is Angular 2 the right choice for my project?
  3. 2. Choosing your scripting language
    1. What is TypeScript?
    2. History of TypeScript
    3. Features of TypeScript
      1. Type Annotation
      2. Type Inference
      3. Type Erasure
      4. Interfaces
      5. Enumerated Type
      6. Generic
      7. Mixin
      8. Namespace
      9. Tuple Types
      10. How to get TypeScript
    4. What is ES6?
    5. History of ECMAScript
    6. Features of ES6
      1. Classes
      2. Enhanced Object Literals
      3. Arrows
      4. Template Strings
      5. Destructuring
      6. Generators
      7. Modules
      8. Module Loaders
      9. Symbols
      10. For...Of loops
      11. Map + Set + WeakMap + WeakSet
      12. Proxies
      13. Promises
    7. What are shims?
    8. What are polyfills?
    9. Should You Use TypeScript or ECMAScript?
    10. Summary
  4. 3. Introducing Our App
    1. Folder Structure
    2. Application Setup
    3. Hello World
    4. Template Syntax
      1. Interpolation
      2. Square bracket syntax
      3. Event Binding
      4. Two-way Data Binding
    5. Built-in Directives
      1. NgIf
    6. Introduction To Services
      1. Dependence Injection
    7. Basic Routing
      1. RouterOutlet
      2. RouterLink
      3. @Routes
  5. 4. Components
    1. Component Decorator
    2. Component Usage:
    3. Using injectable services
    4. Pipes
      1. Built in pipes
      2. Writing custom pipes
    5. Directives
      1. Using components in another one
    6. Inter-component communication
      1. Using Events
    7. Component lifecycle
    8. Summary
  6. 5. Directives
    1. Attribute Directives
      1. Replicating NgClass
    2. Structural Directives
    3. Summary
  7. 6. Services
    1. HTTP and Observables
    2. Communicating with local storage and event emitters in services
    3. Importing external libraries
    4. Summary
  8. 7. Pipes
    1. Built-in Pipes
      1. String -> String
      2. Number -> String
      3. Object -> String
      4. Misc
    2. Custom Pipes
      1. Create pipes
      2. Use custom pipes
  9. 8. Routing
    1. Configuration
    2. Router Outlet
    3. Router Link
    4. Route Parameters
    5. Lifecycle hooks
  10. 9. Forms
    1. Controls
    2. ControlGroup
    3. Your First Form
    4. The Component
    5. The Template
    6. Using FormBuilder
    7. Formbuilder in Your Views
    8. Validators
      1. Form Messages
      2. Field Message
      3. Field Coloring
      4. Specific Validation
    9. Creating the product Control as an instance variable without creating an instance for every Control
      1. Field Coloring
      2. Form Reference Through Form Export
    10. Custom Validations
      1. Writing a Custom Validator
    11. ngModel
    12. Summary
  11. 10. Change Detection
    1. What’s Change Detection?
    2. Changes and Events
    3. Zones
    4. Change Detectors and Components
      1. OnChanges
    5. Change Detection Tuning
      1. Change Detection Strategy
      2. OnPush Strategy
      3. Mutable and Immutable
      4. Using Observable
    6. Summary
  12. 11. RxJS
    1. What is Observable?
    2. Hot and cold observables
    3. Reactive Angular 2
      1. Event streams flow
      2. HTTP
      3. Forms
  13. 12. Testing
    1. First tests
    2. Services
    3. Mocking Providers
    4. Components
    5. Event Emitters and Observables
    6. Pipes
    7. Router
    8. HTTP
  14. 13. Migration
    1. Preparation
      1. Follow the Angular 1.x styleguide
      2. Using module loader
      3. “Typescriptify” your code
    2. Migrating
      1. Using UpgradeAdapter
      2. Making Angular 1.x service available to Angular 2.0
      3. Migrating a component
      4. Migrating a directive
      5. Migrating a filter (to pipe)
      6. Migrating a service
    3. Summary