Created
October 20, 2022 21:38
-
-
Save tomastrajan/f5a8b36ac9a02bdebedf66f9eea656e8 to your computer and use it in GitHub Desktop.
Revisions
-
tomastrajan created this gist
Oct 20, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ @Component({ /* ... */ }) export class SomeComponent { // streamifies input @Input$() prop: Observable<string>; // lifecycle notifier as an Observable stream @OnDestroy$() destroy$: Obseravble<void>; // lifecycle hook as decorator instead of implements interface @OnInit() init() { // could be any method name when used with decorator } }