CONTENTS
Chapter 1: Quick Introduction to Angular
Supported Versions of Angular: How It Works
The Reason for Skipping Angular 3
Moving from Angular 2 to Angular
What You Need to Learn for Angular Applications
One-Way Data Binding in Angular
Tree Shaking an Angular Application
A High-Level View of Angular Applications
A “Hello World” Application via the Angular CLI
The Structure of an Angular Application
The Naming Convention for Angular Project Files
Exporting and Importing Packages and Classes (Optional)
The Top-Level Module File app.module.ts
The Top-Level Component File app.component.ts
Working with Components in Angular
Stateful versus Stateless Components in Angular
Generating Components with the Angular CLI
Listing 1.6: student.component.ts
Listing 1.7: student.component.spec.ts
Syntax, Attributes, and Properties in Angular
Attributes versus Properties in Angular
Displaying a Button in Angular
Chapter 2: UI Controls and User Input
Debugging Angular Code in the Console
The ngFor Directive in Angular
Adding Items to a List in Angular
Deleting Items from a List in Angular
Angular Directives and Child Components
Listing 2.6: child.component.ts
The Constructor and Storing State in Angular
Private Arguments in the Constructor: A Shortcut
Detecting Mouse Positions in Angular Applications
Listing 2.10: app.component.ts
Mouse Events and User Input in Angular
Listing 2.14: app.component.ts
Listing 2.16: app.component.ts
The moduleId and templateUrl Properties in Angular
Listing 2.22: itemdetails.html
Working with Custom Classes in Angular
Listing 2.24: app.component.ts
Click Events in Multiple Components
Listing 2.25: app.component.ts
Working with @Input, @Output, and EventEmitter
Listing 2.27: app.component.ts
Listing 2.28: childcomponent.ts
Styling Elements and Shadow DOM in Angular
Listing 2.30: app.component.ts
Chapter 3: Graphics and Animation
A Simple Example of Angular Lifecycle Methods
GSAP Animation and the ngAfterContentInit() Method
Listing 3.4: ArchTubeOvals1.ts
CSS3 Animation Effects in Angular
Animation Effects via the “Angular Way”
A Basic SVG Example in Angular
Angular and Follow-the-Mouse in SVG
Listing 3.11: app.component.ts
Listing 3.14: app.component.ts
Pure CSS3 3D Animation in Angular
Listing 3.16: Anim240Flicker3DLGrad2SkewOpacity2Reflect1DIV6.css
CSS3 and jQuery Animation Effects in Angular
Listing 3.18: app.component.ts
Animation Effects “the Angular Way”
Listing 3.20: app.component.html
Listing 3.21: app.component.ts
Chapter 4: HTTP Requests and Routing
Dependency Injection in Angular
Flickr Image Search Using jQuery and Angular
Combining Promises and Observables in Angular
Reading JSON Data via an Observable in Angular
Multiple Concurrent Requests with forkJoin() in Angular
TypeScript Interfaces in Angular
JSON Data and TypeScript Interfaces
An Angular Application with a TypeScript Interface
Getting GitHub User Data in Angular
Listing 4.13: app.component.ts
HTTP GET Requests with a Simple Server
Listing 4.14: app.component.ts
HTTP POST Requests with a Simple Server
Listing 4.16: app.component.ts
Listing 4.18: app.component.ts
Chapter 5: Forms, Pipes, and Services
Angular Forms with FormBuilder
Listing 5.5: app.component.html
Other Form Features in Angular
Angular Forms and Bootstrap 4 (optional)
Creating a Custom Angular Pipe
Listing 5.8: pipe.component.ts
Listing 5.9: user.component.ts
Listing 5.13: app.component.ts
A Service with an EventEmitter
Listing 5.14: user.component.ts
Listing 5.16: app.component.ts
Listing 5.18: app.component.ts
Listing 5.19: user.component.ts
Other Service-Related Use Cases
Services and Intercomponent Communication
Injecting Services into Services
Chapter 6: Angular and Express
A Minimalistic Node Application
Set Up a Node Environment (Optional)
Launch the Express Application
An Application with Angular and Express
Starting the Server and the Angular Application
Concurrent Requests and Angular (Version 2)
How to Start the Express Server Code
An Express Application with MongoDB (Part 1)
The Server-Side Custom Files (Part 2)
Launching the Server-Side Application
An Angular Application with Express
Listing 6.10: app.component.ts
Angular and Japanese Text (Optional)
Listing 6.12: load-japanese.js
The Server File main.server.ts
Working with Microservices (Optional)
Disadvantages of Microservices
Chapter 7: Flux, Redux, GraphQL, Apollo, and Relay
The Store and Application State
Data Structures for Application Data
A Reducer to Add/Subtract Numeric Values
A Reducer to Add/Remove Strings from an Array
Redux Reducers Are Synchronous
Defining a Type System in GraphQL
Project Structure in the Angular Client
Chapter 8: Angular and Mobile Apps
Mobile Development with Ionic 2
Installation and Project Creation
The Project Structure of Ionic Applications
Retrieving GitHub User Data in an Ionic Application
Installation and New Project Creation
How to Create a React Native Application
Deploying React Native Apps to a Mobile Device
React Native versus NativeScript: A High-Level Comparison
Progressive Web Apps (Optional)
Web Workers and Service Workers
Chapter 9: Functional Reactive Programming
What Is Functional Reactive Programming (FRP)?
Promises and Asynchronous Events
An Analogy Regarding Observables
Intermediate and Terminal Operators
The subscribe() and unsubscribe() Operators
The subscribe() and forEach() Operators
Converting Data Sources to Observables
Using range() and filter() Operators
Listing 9.1 ObservableRangeFilter1.html
Using from() and map() Operators
Listing 9.2 ObservableMapUpper1.html
Using the interval(), take(), and map() Operators
Listing 9.3 ObservableTake.html
A List of Merge/Join Operators
A List of Map-Related Operators
Listing 9.4 ColdObservables1.html
Listing 9.5 ObservableDivElement2.html
RxJS and SVG Graphics/Animation
Listing 9.6 SVGObservables1Anim1.html
RxJS and Mouse Events in an HTML Web Page
Listing 9.7 SVGObservables1MouseMove1.html
Unsubscribing in Angular Applications
Creating Observables in Version 5 of RxJS
d3.express: The Integrated Discovery Environment
Chapter 10: Miscellaneous Topics
The package.json Configuration File
The tsconfig.json Configuration File
Status of AOT, CLI, and Angular Universal
Tree Shaking and the Rollup Utility
Reducing the Size of Angular Applications
A Simple Example of Launching Webpack
A Simple webpack.config.js File
Listing 10.3: webpack.config.js
Hot Module Reloading (HMR) and Webpack
AOT via a Modified webpack.config.js
Listing 10.4: webpack.config.js
Support for I18n and L10n in Angular Applications
Working with a Component Container