万本电子书0元读

万本电子书0元读

顶部广告

Angular 2 Components电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Nir Kaufman

出  版  社:Packt Publishing

出版时间:2016-11-01

字       数:36.7万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A quick and concise guide to Angular 2 Components About This Book First look to the Angular 2 Components architecture Creating your own Angular 2 Component Integrating your components with third party components Who This Book Is For If you are a front-end developer with some experience in Angular and want to understand Angular 2 Components, and easily put it to use to create powerful user interfaces and views, then this book is for you 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 In Detail 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. Style and approach A step-by-step guide covering features and working of Angular 2 Components along with the process for creating your own components.
目录展开

Angular 2 Components

Table of Contents

Angular 2 Components

Credits

About the Authors

About the Reviewers

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

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

2. Setting Up an Angular 2 Development Environment with angular-cli

Node and npm

Installing Node

Introducing npm

Installing angular-cli

Generating an Angular 2 project

Choosing an IDE

Summary

3. The TypeScript Primer

Introduction to TypeScript

Managing dependencies with modules

The export and import statements

The default exports

Classes

The type system

The basic types

The custom types

About generics

Using decorators

Decorators versus annotations

Summary

4. Building a Basic Component

Bootstrapping the application

The component selector

Selector options

The component template

Embedding styles in component template

The shadow DOM

Encapsulation modes

Data bindings

Summary

5. Building Dynamic Components

Data interpolation

Core directives

NgIf

The asterisk – *

NgClass

NgStyle

NgSwitch

NgFor

Property bindings

Event bindings

Two-way bindings

Summary

6. Component Communication

Passing data via properties

Emitting custom events

Referencing with a local variable

Querying child components with the parent component

Summary

7. Putting It All Together

Preparing our development environment

The accordion component

Extending the accordion component tree

The component life cycle

Life cycle event interfaces

OnInit and OnDestroy

OnChanges

Other life cycle events

Summary

8. Integrating Third-Party Components

Preparing our development environment

Importing dependencies

Bootstrap tooltip component

Bootstrap collapse component

Summary

9. Angular 2 Directives

Components and directives in Angular 2

Preparing our development environment

The basic attribute directive

ElementRef and Renderer

Reacting to events from the host element

Passing properties to the directive

The basic structural directive

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部