Created
December 30, 2020 17:35
-
-
Save andrewarosario/69fae06bfbb7a19c002e48b597a00918 to your computer and use it in GitHub Desktop.
This file contains 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 characters
export class AppComponent { | |
note = new FormControl(""); | |
saveIndicator$ = of("Todas as mudanças foram salvas"); | |
ngOnInit() { | |
const inputToSave$ = this.note.valueChanges.pipe( | |
debounceTime(300), | |
distinctUntilChanged(), | |
share() | |
); | |
inputToSave$.subscribe(console.log); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment