万本电子书0元读

万本电子书0元读

顶部广告

Getting Started with Angular - Second Edition电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Minko Gechev

出  版  社:Packt Publishing

出版时间:2017-02-01

字       数:187.8万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Fast-track your web development skills to build high performance SPA with Angular 2 and beyond About This Book Up to date with the latest API changes introduced by Angular 2 and 4 Get familiar with the improvements to directives, change detection, dependency injection, router, and more Understand Angular's new component-based architecture Start using TypeScript to supercharge your Angular applications Who This Book Is For Do you want to jump in at the deep end of AngularOr perhaps you’re interested assessing the changes to AngularJS before moving overIf so, then "Getting Started with Angular" is the book for you. To get the most out of the book, you’ll need to be familiar with AngularJS 1.x, and have a good understanding of JavaScript. What You Will Learn Understand the changes made from AngularJS with side-by-side code samples to help demystify the Angular learning curve Start working with Angular’s new method of implementing directives Use TypeScript to write modern, powerful Angular applications Dig in to the change detection method, and other architectural changes to make sure you know what’s going on under the hood of Angular Get to work with the new router in Angular Use the new features of Angular, including pipes, and the updated features such as forms, services, and dependency injection Learn about the server-side rendering in Angular to keep your new applications SEO-friendly Enhance your applications using Ahead-of-Time compilation and Web Workers In Detail I'm delighted to see this new update and hope it helps you build amazing things with Angular. - Mi?ko Hevery, Creator of AngularJS and Angular Angular is the modern framework you need to build performant and robust web applications. This book is the quickest way to upgrade your AngularJS knowledge to the brave new world of Angular, and get grips with the framework. It starts with an overview putting the changes of the framework in context with version 1. After that, you will be taken on a TypeScript crash-course so you can take advantage of Angular in its native, statically-typed environment. You'll explore the new change detection mechanism in detail, how directives and components have changed, how you create applications with Angular, and much more. Next, you'll understand how to efficienly develop forms, use the router, implement communication with HTTP services, and transform data with custom pipes. Finally, we will take a look at the Angular's Ahead-of-Time compiler, angular-cli and other such tools that help us build professional applications. By the end of the book, you’ll be ready to start building quick and efficient Angular applications compatible with v2 and v4, that take advantage of all the new features on offer. This book is up to date for the 2.4 release and is compatible with the 4.0 release as well. Style and approach Starting with a comparison between Angular versions, this book is filled with side-by-side code examples to help highlight the changes. Each chapter then looks at major changes to the framework and is filled with small examples and sample code to get you started.
目录展开

Getting Started with Angular Second Edition

Getting Started with Angular Second Edition

Credits

Foreword

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

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

Errata

Piracy

Questions

1. Get Going with Angular

Angular and semver

The evolution of the Web - time for a new framework

The evolution of ECMAScript

Web Components

Web Workers

Lessons learned from AngularJS in the wild

Controllers

Scope

Dependency injection

Server-side rendering

Applications that scale

Templates

Change detection

Summary

2. The Building Blocks of an Angular Application

A conceptual overview of Angular

Changing directives

Getting to know Angular components

Components in action

Components in Angular

Angular modules

Bootstrapping an Angular application

Pipes

Defining pipes

Improving change detection

Classical change detection

Change detection in AngularJS

In the zone.js

Simplified data flow

Enhancing AngularJS's change detection

Services

The new router

Angular route definition syntax

Summary

3. TypeScript Crash Course

Introduction to TypeScript

Compile-time type checking

Better support by text editors and IDEs

There's even more to TypeScript

Using TypeScript

Installing TypeScript with npm

Running our first TypeScript program

TypeScript syntax and features introduced by ES2015 and ES2016

ES2015 arrow functions

Using the ES2015 and ES2016 classes

Defining variables with block scope

Meta-programming with ES2016 decorators

Using configurable decorators

Writing modular code with ES2015

Using the ES2015 module syntax

Taking advantage of the modules' implicit asynchronous behavior

Using aliases

Importing all the module exports

Default exports

ES2015 module loader

ES2015 and ES2016 recap

Taking advantage of static typing

Using explicit type definitions

The type any

Understanding the Primitive types

The Enum types

Understanding the Object types

The Array types

The Function types

Defining classes

Using access modifiers

Defining interfaces

Interface inheritance

Implementing multiple interfaces

Further expressiveness with TypeScript decorators

Writing generic code by using type parameters

Using generic functions

Having multiple type parameters

Writing less verbose code with TypeScript's type inference

Best common type

Contextual type inference

Using ambient type definitions

Using predefined ambient type definitions

Custom ambient type definitions

Summary

4. Getting Started with Angular Components and Directives

The "Hello world!" application in Angular

Using TypeScript

Setting up our environment

Installing the sample project repository

Playing with Angular and TypeScript

Using Angular directives

The ngFor directive

Improved semantics of the directives syntax

Declaring variables inside a template

Using syntax sugar in templates

Defining Angular directives

Setting the directive's inputs

Understanding the directive's constructor

Better encapsulation of directives with NgModules

Using NgModules for declaring reusable components

Using custom element schema

Creating custom Angular components

Introducing the component's view encapsulation

Implementing the component's controllers

Handling user actions

Using inputs and outputs

Determining of the inputs and outputs

Defining the inputs and outputs

Passing inputs and consuming the outputs

Event bubbling

Renaming the inputs and outputs

An alternative syntax to define inputs and outputs

Explaining Angular's content projection

Basic content projection in Angular

Projecting multiple content chunks

Nesting components

Using ViewChildren and ContentChildren

ViewChild versus ContentChild

Hooking into the component's life cycle

Order of execution of the life cycle hooks

Defining generic views with TemplateRef

Understanding and enhancing the change detection

The order of execution of the change detectors

Understanding Angular's change detection strategies

Introducing immutable data structures and OnPush

Using immutable data in Angular

Summary

5. Dependency Injection in Angular

Why do I need DI?

DI in Angular

Benefits of DI

Configuring an injector

Dependency resolution with generated metadata

Instantiating an injector

Introducing forward references

Configuring providers

Using existing providers

Defining factories for instantiating services

Child injectors and visibility

Building a hierarchy of injectors

Configuring dependencies

Using the @Self decorator

Skipping the self injector

Having optional dependencies

Using multiproviders

Using DI with components and directives

Configuring DI with NgModules

Introducing the element injectors

Declaring providers for the element injectors

Exploring DI with components

viewProviders versus providers

Using Angular's DI with ES5

Summary

6. Working with the Angular Router and Forms

Developing the "Coders repository" application

Exploring the Angular router

Using PathLocationStrategy

Configuring routes

Using routerLink and router-outlet

Lazy-loading with loadChildren

Prefetching of lazy-loaded routes

RouterModule.forRoot versus RouterModule.forChild

Using Angular's forms module

Developing template-driven forms

Digging into the template-driven form's markup

Using the built-in validators

Defining custom validators

Using select inputs with Angular

Using the NgForm directive

Two-way data binding with Angular

Storing the form data

Listing all the stored data

Summary

7. Explaining Pipes and Communicating with RESTful Services

Developing model-driven forms in Angular

Using composition of control validators

Exploring the HTTP module of Angular

Using Angular's HTTP module

Defining parameterized views

Defining nested routes

Transforming data with pipes

Developing stateless pipes

Using Angular's built-in pipes

Developing stateful pipes

Using stateful pipes

Using Angular's AsyncPipe

Using AsyncPipe with observables

Summary

8. Tooling and Development Experience

Running an application in a Web Worker

Web Workers and Angular

Bootstrapping an application running in a Web Worker

Migrating an application to Web Worker

Making an application compatible with Web Workers

Initial load of a SPA

Initial load of a SPA with server-side rendering

Server-side rendering with Angular

Enhancing our development experience

Text editors and IDEs

Angular language service

Bootstrapping a project with angular-cli

Using angular-cli

Angular quick starters

Angular Seed

Angular 2 Webpack starter

AoT compilation in Angular

How code generation works

Introducing AoT compilation

Constraints of the AoT compilation

How to use the AoT compilation of Angular

Summary

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部