Outline
- A Better Way to Learn Angular
- Understanding The Differences Between AngularJS and Angular
- Building "Hello World" in Angular
- Building UI Functionality with Angular Components
- Angular Directives
- Formatting Data in Angular Templates with Pipes
- Creating TypeScript Models for Angular
- Modularizing Angular Apps with NgModule
- Routing & Navigation with Angular's Router
- Angular Services
- A Better Way to Learn RxJS & Observables
- Using Angular's HTTP Client to Interact with Servers
- Building & Running Apps with the Angular CLI
Outline
- A Better Way to Learn Angular
- Understanding The Differences Between AngularJS and Angular
- Building "Hello World" in Angular
- Building UI Functionality with Angular Components
- Angular Directives
- Formatting Data in Angular Templates with Pipes
- Creating TypeScript Models for Angular
- Modularizing Angular Apps with NgModule
- Routing & Navigation with Angular's Router
- Angular Services
- A Better Way to Learn RxJS & Observables
- Using Angular's HTTP Client to Interact with Servers
- Building & Running Apps with the Angular CLI
It's important to cover the basic terminology, and its corresponding functionality, that RxJS contains before proceeding to real examples.
Observer
You usually won't interact with the Observer object directly, as you'll likely interact with a Subject instead (which we cover below), but it's important to know what it does.
Observers allow you to "push" new data into an observable sequence. You can think of this as a "Write-only" way of modifying observable sequences (to go back to our analogy of assembly lines, observers can only add new cars onto an assembly line).
Observable
An Observable is what we can use to listen, aka subscribe, to new changes that are emitted by an Observer. Think of this as a "Read-only" assembly line (you can only observe when new cars come off the assembly line).
Subject
A Subject is simply an Observer and Observable. You can push new values as well as subscribe to it. Think of this as a "Read & Write" assembly line (you can both add cars onto the assembly line and observe cars that come off the assembly line).
Operators
The purpose of Operators in RxJS are the same as most operators in other programming languages/libraries: they allow you to perform operations on your code.
In RxJS, you can think of Operators as a way to manipulate the data coming from a Subject (or Observer) before it's sent to an Observable. This is the equivalent of instructing an assembly line to modify the car in a certain way (i.e. paint it black, shine it, etc) and then return it to the next assembly line.