flatMap is deprecated and replaced by mergeMap
Thursday, December 22, 2022
RxJS mergeMap
RxJS switchmap example
RxJS switchmap example, easy to understand
https://stackblitz.com/edit/rxjs-switchmap-example-1-vslesu?file=index.ts
Wednesday, December 14, 2022
rxjs note - Angular - The Complete Guide
1.
In order to follow along smoothly with the course examples, make sure you install RxJS v6 by running
- npm install --save rxjs@6
In addition, also install the rxjs-compat package:
- npm install --save rxjs-compat
2.- To get discount on Max's courses, go to https://academind.com/courses
- 3.
- https://www.learnrxjs.io/
- 4.
- Use Subject instead of EventEmitter, emit->subject.next
- 5.
typescript
Type script:
Monday, December 12, 2022
bootstrap
1. bootstrap grid
https://mdbootstrap.com/learn/mdb-foundations/bootstrap/grid-system/
for the grid to work properly, you should always place columns in rows, and rows in containers.
Bootstrap grid allows you to add up to 12 columns in one line. If you add more than 12, the excess column will jump to the next line.
Breakpoints are the triggers in Bootstrap for how your layout responsive changes across device or viewport sizes.
<div class="container">
<div class="row">
<div class="col-md-4">First column</div>
<div class="col-md-8">Second column</div>
</div>
</div>
All we have to do is add a breakpoint -md
(meaning "medium screen size") to the col
class, so that the Bootstrap grid knows that we want 4/8 columns ratio only on screens bigger than medium size, and on other screens (medium and small size) the columns should be stretched to full width.
To sum up - by using class col-md-4
, we tell grid the following command:
- On screens smaller than 768px, I want this column to stretch to full width
- On screens larger than 768px, I want this column to be 4 units wide
Angular - The Complete Guide Section 5 note
@Input('srvElement') element : {type: string, name: string, content: string};
<app-server-element *ngFor="let serverElement of serverElements"
[srvElement]="serverElement"></app-server-element>
Go the error "ERR_OSSL_EVP_UNSUPPORTED"
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
when run "ng serve"
The fix is:
export NODE_OPTIONS=--openssl-legacy-provider
https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported
Sunday, December 11, 2022
Angular - The complete Guide Section 1 and 2 note
package.json: the project dependencies