Angular 2 Components

A quick and concise guide to Angular 2 Components

Angular 2 Components

This ebook is included in a Mapt subscription
Nir Kaufman, Thierry Templier

3 customer reviews
A quick and concise guide to Angular 2 Components
$0.00
$23.99
$29.99
$29.99p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785882340
Paperback124 pages

Book Description

This book is a concise guide to Angular 2 Components and is based on the stable version of Angular 2. You will start with learning about the Angular 2 Components architecture and how components differ from Angular directives in Angular 1. You will then move on to quickly set up an Angular 2 development environment and grasp the basics of TypeScript. With this strong foundation in place, you will start building components.

The book will teach you, with an example, how to define component behavior, create component templates, and use the controller of your component. You will also learn how to make your components communicate with each other. Once you have built a component, you will learn how to extend it by integrating third-party components with it. By the end of the book, you will be confident with building and using components for your applications.

Table of Contents

Chapter 1: Angular 2 Component Architecture
The Model-View-Controller pattern
MVC in Angular 1
Moving from views to components
Defining components
Breaking the application into components
Summary
Chapter 2: Setting Up an Angular 2 Development Environment with angular-cli
Node and npm
Installing angular-cli
Generating an Angular 2 project
Choosing an IDE
Summary
Chapter 3: The TypeScript Primer
Introduction to TypeScript
Managing dependencies with modules
Classes
The type system
Using decorators
Summary
Chapter 4: Building a Basic Component
Bootstrapping the application
The component selector
The component template
The shadow DOM
Encapsulation modes
Data bindings
Summary
Chapter 5: Building Dynamic Components
Data interpolation
Core directives
Property bindings
Event bindings
Two-way bindings
Summary
Chapter 6: Component Communication
Passing data via properties
Emitting custom events
Querying child components with the parent component
Summary
Chapter 7: Putting It All Together
Preparing our development environment
The accordion component
The component life cycle
Life cycle event interfaces
Other life cycle events
Summary
Chapter 8: Integrating Third-Party Components
Preparing our development environment
Importing dependencies
Bootstrap tooltip component
Bootstrap collapse component
Summary
Chapter 9: Angular 2 Directives
Components and directives in Angular 2
Preparing our development environment
The basic attribute directive
The basic structural directive
Summary

What You Will Learn

  • Break your application into reusable dynamic components
  • Take advantage of TypeScript in Angular 2
  • Migrate your Angular 1 directive to an Angular 2 Component
  • Understand the Angular 2 component structure and APIs
  • Hook to component life cycle events
  • Bind dynamic data to your component properties
  • Communicate with other components using events
  • Compose complicated UIs from simple components

Authors

Table of Contents

Chapter 1: Angular 2 Component Architecture
The Model-View-Controller pattern
MVC in Angular 1
Moving from views to components
Defining components
Breaking the application into components
Summary
Chapter 2: Setting Up an Angular 2 Development Environment with angular-cli
Node and npm
Installing angular-cli
Generating an Angular 2 project
Choosing an IDE
Summary
Chapter 3: The TypeScript Primer
Introduction to TypeScript
Managing dependencies with modules
Classes
The type system
Using decorators
Summary
Chapter 4: Building a Basic Component
Bootstrapping the application
The component selector
The component template
The shadow DOM
Encapsulation modes
Data bindings
Summary
Chapter 5: Building Dynamic Components
Data interpolation
Core directives
Property bindings
Event bindings
Two-way bindings
Summary
Chapter 6: Component Communication
Passing data via properties
Emitting custom events
Querying child components with the parent component
Summary
Chapter 7: Putting It All Together
Preparing our development environment
The accordion component
The component life cycle
Life cycle event interfaces
Other life cycle events
Summary
Chapter 8: Integrating Third-Party Components
Preparing our development environment
Importing dependencies
Bootstrap tooltip component
Bootstrap collapse component
Summary
Chapter 9: Angular 2 Directives
Components and directives in Angular 2
Preparing our development environment
The basic attribute directive
The basic structural directive
Summary

Book Details

ISBN 139781785882340
Paperback124 pages
Read More
From 3 reviews

Read More Reviews