Created
May 13, 2022 17:32
-
-
Save twerske/6a9055e3bcf1ef868d30f86441ffd41b to your computer and use it in GitHub Desktop.
Update schematics allows for incremental migration to typed forms
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
// v13 untyped form | |
const cat = new FormGroup({ | |
name: new FormGroup( | |
first: new FormControl('Barb'), | |
last: new FormControl('Smith'), | |
), | |
lives: new FormControl(9) | |
}); | |
// v14 untyped form after running `ng update` | |
const cat = new UntypedFormGroup({ | |
name: new UntypedFormGroup( | |
first: new UntypedFormControl('Barb'), | |
last: new UntypedFormControl('Smith'), | |
), | |
lives: new UntypedFormControl(9) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@twerske, you are missing some curly brackets in the example: