Object Oriented Programming with Angular
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews
Language
English
ISBN
9789389328363
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgement
Preface
Errata
Table of Contents
Learning Angular in Object-Oriented Way
1. Typescript – The Underdog
Introduction
Structure
Objective
Basic Data Types
Number
Boolean
String
Array
Tuple
Enum
Any
Object
void
null and undefined
never
Variable Declaration
Let
Var
Const
Declare
Functions
Regular Function
Anonymous Function
Arrow Function
Classes and Interfaces
Inheritance
Interface
Type Conversion
Union Types
Generics
Decorators
Modules and Namespaces
Advanced Types and Other Keywords
Static
readonly and const
String and Number Literal Types
Type Aliases
Summary
Questions
2. Hello Angular!
Structure
Objective
History of AngularJS to Angular
Setup
Node.js
Angular CLI
Creating a New Project
Changing Default Port
Live Reload
Project Structure
README.md
angular.json
e2e Folder
package.json
package-lock.json
src Folder
Application Workflow
IDE for Angular
Conclusion
Questions
3. Building Small and Simple
Introduction
Structure
Objective
Project Setup
Introduction to @NgModule
What is @NgModule?
Inspecting @NgModule metadata object
Introduction to @Component
What is @Component?
Inspecting @Component Metadata
Introduction to Basic Data Bindings
Types of Data Bindings
Introduction to NgIf, NgFor, and ngForm directives
What is NgIf?
What is NgFor?
What is ngForm?
Building Party-Invite Sign-up form
Production Deployment
Angular Lifecycle Events
Debugging Angular Application
Conclusion
Questions
4. Data Binding and Pipes
Structure
Objective
Introduction to Data Binding
One-way Data Binding – Interpolation – Data Source to View
One-way Data Binding – Event Binding – View to Data Source
HTML Element Data Binding – Local Reference
Two-way Data Binding
HTML Element’s Property Binding
Attribute Data Binding
CSS Class Data Binding
Style Binding
NgClass Binding
Introduction to Pipes
Generating Custom Pipe
Passing Parameters to Pipe
Pure and Impure Pipes
List of Built-in Pipes
Conclusion
Questions
5. @NgModule()
Structure
Objective
@NgModule() versus C# Namespace
Angular Application with @NgModule()
FinanceModule Example
Mapping Namespace of C# with @NgModule() of Angular
@NgModule() Decorator
TypeScript Modules versus @NgModule()
Types of @NgModule()
Eagerly Loaded @NgModule()
Lazy Loaded @NgModule()
Commonly Used @NgModule()
Hands-on
Identifying Different Types of Modules
Introduction to Angular Ivy
Conclusion
Questions
6. Dependency Injection (DI) and Services
Structure
Objective
Introduction to Dependency Injection
Problem Statement with an Example
Solution with Dependency Injection
Dependency Injection in C#
Dependency Injection in Java Spring Framework
Dependency Injection in Angular
Introduction to Angular Services
Automobile application example
Summary
Service Lifetime and Scope
Injector graph
Summary
Injecting Service into Another Service
Mock Services for Faster UI Development
Summary
ElementInjector – Providing Service into Component
Summary
Different Types of Providers
The Provider with “useValue”
C# Analogy
The Provider with “useClass”
C# Analogy
The Provider with “useFactory”
Summary
Organizing services
Conclusion
Questions
7. Building Forms
Structure
Objective
HTML Forms
ASP.NET Forms
AngularJS Forms
Angular Forms
Template-driven Forms
Template-driven Form Validations
Template-driven form Custom Validations
Reactive Forms
Reactive Form Validations
Reactive Form Custom Validator
Template-driven Forms versus Reactive Forms
Conclusion
Questions
8. Communication Between Components
Structure
Objective
C# Windows Form Communications
Parent-Child Communication Using @Input() and @Output()
Parent-Child communication through a local variable reference
Parent-Child communication through @ViewChild() decorator
Passing Data between Components through Service
Passing Data between Components through LocalStorage
Conclusion
Questions
9. Being Alive By Consuming HTTP Resources
Structure
Objective
Introduction to HTTP Methods
Fetch Posts through the GET Method
Using async/await for Blocking the GET Method
Delegate HTTP Operations to Angular Service
Create a New Post Using the POST Method
Update post through PUT method
Delete post through DELETE method
Handling HTTP Errors
Retry HTTP Operation
Passing Parameters in HTTP Requests
Passing HTTP Headers
Organizing server URLs
Switching Between Mock and Real Data Service
Introduction to HTTP Interceptors
Conclusion
Questions
10. Routing in Angular
Introduction
Structure
Objective
What and Why Angular Routing?
Overview of Angular Routing
Building E-commerce Web Application With Routing
Adding Angular Material Design Library
Create Feature Modules with Routes
Login Page with Route
Sign-up Page with Route
Navigating to Routes through the Link
Set the Default Route of the Application
Custom 404 Page-Not-Found page
Route Configuration Ordering
Navigate to Route through Code
Create Child Routes
Enable Debug Trace for Route Configuration
Routing Life Cycle Events
Passing Route Parameter
Passing Data between Routes
Securing a Route Path
CanDeactivate Guard
Prefetching Product Details
Asynchronous Routes
Generating Child Asynchronous Routes through CLI
Inspect Router Tree in Augury
Module Preloading Strategy
Conclusion
Questions
11. Deployment and Best Practices
Introduction
Structure
Objective
Deployment
ng build – Simple Deployment
Production Build
Change dist Folder Path
ng deploy Command
Different Build Configurations
JIT and AOT Compilation
Cross-Origin Resource Sharing (CORS)
ng lint Command
Unit Testing Overview
Code Coverage Report
Performance and Optimization
Polyfills – Older Browser Support
Web Workers
Conclusion
Questions
The book hasn't received reviews yet.