Created
May 5, 2022 22:37
-
-
Save twerske/c06a9dcea9eee1f881d5d08551c8e873 to your computer and use it in GitHub Desktop.
Angular v14 Typed Forms
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
const party = new FormGroup({ | |
address: new FormGroup({ | |
house: new FormControl(123), | |
street: new FormGroup({ | |
name: new FormControl('Powell'), | |
kind: new FormControl('St'), | |
}), | |
}), | |
formal: new FormControl(true), | |
foodOptions: new FormArray([ | |
new FormControl('Soup'), | |
]) | |
}); | |
const street = party.getRawValue().address.street.name; | |
party.patchValue({address: {house: 123}})party.patchValue({address: {house: 123}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment