Skip to content

Instantly share code, notes, and snippets.

{
"workbench.iconTheme": "material-icon-theme",
"workbench.editor.showTabs": false,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.minimap.enabled": false,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
"files.exclude": {
"**/.git": true,
* Promise vs Observable
* Promise
* Single async event that can either complete or fail once.
* Can be used with async/await keywords.
* Observable
* Can emit multiple events async.
* Offers a bit more control over the async task, for example cancelling.
* Cannot be used with async/await keywords.
* Think of Observables as a stream of data instead of an async task.
* Observable is the default used in Angular, but promises are still fine to use.