Last active
November 9, 2020 10:40
-
-
Save nivrith/4f70f0a436cfa604daa10ec3f6d82462 to your computer and use it in GitHub Desktop.
Truly Reactive Angular Forms - Populating Forms with Async Default Values
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 characters
| ... | |
| form$: Observable<FormGroup>; | |
| constructor(private fb: FormBuilder) {} | |
| ngOnInit() { | |
| post$ = this.store.select(postQuery.selectCurrentPost); | |
| form$ = this.post$.pipe(map(post => this.fb.group(post))); | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment