# 22.02 Beginning Angular: topics

## Angular In Context

- We will discuss and explore where Angular fits in the broad world of user interface software development, where it fits within the world of web development, and specifically where it fits in delivering software internally and for our customers at your company.
- Introduction to "Single Page Applications"
- Problems solved by Angular: change detection
- How Angular applications are built, tested, and deployed to production.
- How Angular applications are delivered to the user.

## Development Environment

- The Angular CLI (Command Line Interface)
  - Installing, using globally and locally
  - Using the Angular CLI to create a new Angular project
  - Using the Angular CLI to test our Angular Application
    - Running Unit and Unit Integration Tests
    - Running System Tests with Playwright
  - Using the Angular CLI to generate code
  - Configuring preferences in the angular.json file using the Angular CLI
  - Running a development version of our Angular app during coding
- Introduction to Vite, and "Hot Module Replacement"
- Differences between the development server and the built Angular application.
- Configuring Visual Studio Code
  - How to configure Visual Studio Code for optimal Angular development
  - Recommended settings, extensions
  - Configuring code formatting with Prettier
  - Configuring code analysis rules with ESLint
- Introduction to Node Package Management
  - Installing and updating dependencies
  - The purpose of the package.json and package-lock.json files.
  - Introduction to Semantic Versioning
  - Guidance on package management for teams

## Angular Building Blocks

- The "entry point" - main.ts
- Application configuration app.config.ts
- The "root" Angular component - app.ts
- Creating Angular Components
  - Generating components with the Angular CLI
  - Setting Angular CLI preferences for component creation
  - Component Overview
    - Component metadata
    - Selectors
    - Inputs
    - Providers
    - The TypeScript class
    - The template
    - The styles
  - Component Templates
    - Introduction to ngc (the Angular template compiler)
    - Component template control flow
      - `@for`, `@if`, `@else`, `@switch`, `@let`
      - Template variables
    - Component Styling
      - Global styling in your Angular application
      - How Angular isolates component styles
      - Using style sheets in a component
      - Using `[class]` bindings
  - Component State and Behavior
    - Implementing data and code inside of a component.
    - Introduction to Signals
      - Defining Signals in a component
      - Setting a new value on a Signal
      - Updating a Signal's value
      - Computing new Signals based on other Signals
      - Using Signal effects for technical requirements
  - Component Communication
    - Creating child components
    - Passing data to a component using input
    - Making inputs required, and transforming inputs
    - Notifying the parent of an event with output
    - Limitations of Component Communication
  - Using and creating Angular pipes to transform data in a template
  - Angular Directives
    - Difference between components and directives in Angular
    - Using Angular directives
    - Creating an Angular directive
    - Creating an Angular directive with parameters
  - Creating Angular Services
    - The purpose of services in Angular
    - Providing services - scope and lifetime
    - Providing services globally
    - Providing services for a set of routes
    - Providing services for a component
    - Injecting services
    - Injecting services into components
    - Injecting services into other services
    - Injecting in an "Injection Context"
    - Designing services

## Routing in Angular

- The purpose of routing in Angular
- Defining routes in app.routes.ts
- Defining _nested routes_ for features
- Breaking large apps into "bundles" using loadChildren() and loadComponent()
- Route parameters and component input binding

## Introduction to API Interactions

- Defining services for API Access
- Using the Angular HttpClient
- Configuring the HttpClient, and interceptors
- Injecting the HttpClient
- Observables (rxjs) and the HttpClient
- Converting observables to Angular Signals
- Reading data from an API
- Sending data to an API
- The Angular HttpResource and Resource APIs

## Introduction To Testing Angular Apps

- The contribution of TypeScript to testing
- Introduction to developer testing levels
- Fast tests with Unit and Unit Integration tests
- System tests with Playwright

## Pre-Work

Developers come to Angular development with a variety of technical backgrounds. To optimize the training experience for all, developers will have to prove some level of proficiency in a few topics prior to the class. Many developers will have some or all of the requisite skills, and will easily pass the test. Some will have gaps and will be provided with resources to gain some general competency with the following topics:

- Introduction to the Web Application Platform
  - Web Applications vs. "Apps"
  - HTTP
  - HTML, CSS and JavaScript
  - Browser APIs (DOM, Fetch, etc.)
- Developer Tools
  - NodeJS Applications
  - Visual Studio Code
  - Git Source Code Control
  - TypeScript Language Basics

This class does _not_ require advanced knowledge or ability with any of these, but it is important to ensure students have some understanding of the _landscape_ in which we work as Angular developers, as well as some familiarity with the tools. To help students meet these requirements, resources will be provided that the student can explore in a self-paced manner. These will include short video lectures that have explanations and demonstrations, some small coding practices and exercises, and "deep dive" overviews of each topic, along with links for further exploration and learning.
