Duration
3 days
Introduction
The Angular 14 training course covers all major components, syntax, and tooling of the Angular web application framework. Angular 8 fulfil the expectations of modern developers who demand fast performance and responsiveness from their web applications. Participants will set up their working environment to have all the tools needed to start building Angular 8 components with minimum effort. The program starts with an introduction of JavaScript, NPM, and TypeScript. Participant will understand TypeScript, a powerful typed superset of JavaScript that compiles to JavaScript. The course dives into component-driven development with Angular components. The participants will also learn to create and use Angular 8 Directives and Pipes. Data binding (both 1 and 2 way) is discussed in the context of the new directive API. Finally, the core parts of Angular such as services, HTTP, routing, form validation are covered to develop applications based on the Model-View-Controller (MVC) architecture.
Objective
- Utilize the Angular core constructs to build Single Page Applications.
- Install necessary modules correctly using NPM.
- Write applications in TypeScript to be transferred to browser-supported JavaScript.
- Build Template and Module-driven forms.
- Utilize Pipes and built-in data formatting tools.
- Setup routing and URLs.
- Execute CRUD commands on REST APIs over Http.
Prerequisites
Before attending this course, students should have general programming experience and knowledge of HTML, CSS and JavaScript.
Course Topics
Day 1
9:00am - 10:30am
Introduction
- Overview of ES5
- Installing Node and NPM
- JavaScript Basic Syntax
- Detailing on ES5 problems
- JavaScript project creation using NPM
- Introduction to TypeScript
- TypeScript Environment Setup
- Basic Syntax
- Types, Variables and Operators
- Decision Making and Loops
- Functions and Lambda Expressions
10:30am - 10:45am Morning Break
10:45am - 12:30pm
- Introduction to TypeScript
- Classes and Objects
- Inheritance and Interface
- Generics
- Enums
- Number and Strings
- Arrays
- Tuples and Union
- Namespaces and Modules
- Decorators
- Ambients
- Mixins
12:30pm - 1:30pm Lunch Break
1:30pm - 3:30pm
- Introduction to Angular
- Angular CLI
- Why Angular 14
- Angular 14 Features
- Installing and Using Angular 14
- Creating the first Angular Project
- Architecture Overview
- What is new in Angular 14
- Summary
3:30pm - 3:45pm Afternoon Break
3:45pm - 5:00pm
- Building with Components
- Introducing the component
- Component Decorator Properties
- Template
- Inline Template
- Interpolation – Plain text, Object and Array
- Adding CSS
- Component Starter
- Integrating Bootstrap
- Summary
Day 2
9:00am - 10:30am
- Data and Event Binding
- Binding Syntax
- One-Way Binding
- Property binding
- Attribute binding
- Setting Element Properties
- Binding Events
- Template Reference Variables
- Two-Way Binding of Input Fields
- Summary
- Attribute Directive
- What are Directives
- Directive Types
- Apply Styles using NgClass and NgStyle
- Applying Styles Directly
- Obsolete Directives and Property Binding
- Controlling Element Visibility
- Setting Image Source Dynamically
- Setting Hyperlink Source Dynamically
- Summary
10:30am - 10:45am Morning Break
10:45am - 12:30pm
- Structural Directives
- Adding and Removing Elements Dynamically
- Looping Using ngFor
- ngFor - Basic Syntax
- Creating Tables with ngFor
- ngFor Local Variables
- Swapping Elements with ngSwitch
- ngSwitch - Basic Syntax
- ngSwitch - Full Template Syntax
- Summary
12:30pm - 1:30pm Lunch Break
1:30pm - 3:30pm
- Template Driven Forms
- A Basic Angular Form
- Binding Input Fields
- Accessing the Form Object
- Binding the Form Submit Event
- The Submit Function
- Basic HTML5 Validation - "required" Attribute
- Angular Validators
- Angular Validation State
- Displaying Form Validation State
- Displaying Field Validation State
- Disabling Submit when Form is Invalid
- Submitting the Form
- Binding to Object Variables
- Additional Input Types
- Checkboxes
- Select (drop down) Fields
- Rendering Options for Select (drop down)
- Date fields
- Radio Buttons
- Summary
3:30pm - 3:45pm Afternoon Break
3:45pm - 5:00pm
- Pipes and Data Formatting
- What are Pipes?
- Using a Built-in Pipe
- Chaining Pipes
- Some Pipe Examples
- Decimal Pipe, Currency Pipe
- Custom Pipes
- Using Custom Pipes
- A Filter Pipe
- A Sort Pipe
- Pipe Category: Pure and Impure
- Pure Pipe Example
- Impure Pipe Example
- Summary
Day 3
9:00am - 10:30am
- The Angular Component Router
- Routing and Navigation
- The Component Router
- Traditional Browser Navigation
- Component Router Terminology
- Setting up the Component Router
- Routes
- The app.routes.ts File
- Bootstrapping Routing in Main.ts
- A Basic App With Routing
- App Routes
- App Component
- Programmatic Navigation
- Basic Navigation
- Passing Data During Navigation
- Creating Routes with Route Parameters
- Navigating with Route Parameters
- Using Route Parameter Values
- Retrieving the Route Parameter Synchronously and Asynchronously
- Query Parameters
- Query Parameters - queryParams
- Query Parameters - Navigation
- Retrieving Query Parameters Asynchronously
- Summary
10:30am - 10:45am Morning Break
10:45am - 12:30pm
- Services and Dependency Injection
- What is a Service?
- Creating a Basic Service
- What is Dependency Injection?
- What Dependency Injection Looks Like
- Injecting Services
- Using a Service in a Component: Dedicated Instance
- Using OnInit to Initialize Component Data
- Using a Shared Service Instance
- Dependency Injection and @Host
- Dependency Injection and @Optional
- Summary
12:30pm - 1:30pm Lunch Break
1:30pm - 3:30pm
- RxJS and Observables
- What is an Observable?
- Observable Operators
- Creating Observables Using Static Operators
- What is an Observer?
- Subject
- Subject Example
- Event Emitter or Observable
3:30pm - 3:45pm Afternoon Break
3:45pm - 5:00pm
- HTTP Client
- The Angular HTTP Client
- Importing Individual Providers into Services
- Service Using Http Client
- Service Imports
- What does an Observable Object do?
- Making a Basic HTTP GET Call
- Using the Service in a Component
- Importing Observable Methods
- Enhancing the Service with .map() and .catch()
- Using .map()
- Using .catch()
- Using toPromise()
- GET Request
- GET Request with Options
- POST Request
- POST Request Example
- Reading HTTP Response Headers
- Summary
Programme scope, delivery arrangements and suitability are confirmed during enquiry.