Skip to content

Instantly share code, notes, and snippets.

@bonomiandreia
Created March 25, 2022 02:53
Show Gist options
  • Save bonomiandreia/debc10595d524556ee46ebcc1588fd89 to your computer and use it in GitHub Desktop.
Save bonomiandreia/debc10595d524556ee46ebcc1588fd89 to your computer and use it in GitHub Desktop.
observables and subject study
observables are lazy, means that if it doesnt have a subscribe, observables cant execute the code.
Subject are other type of observable, they both can emit many values.
observables can't emit data outside itself.
subjects can emit multiples values outside itself.
example: https://stackblitz.com/edit/angular-ivy-5tnmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment