How do you verify the model changes in forms?
You can add a getter property(let's say, diagnostic) inside component to return a JSON representation of the model during the development. This is useful to verify whether the values are really flowing from the input box to the model and vice versa or not.
export class UserProfileComponent {model = new User('John', 29, 'Writer');// TODO: Remove after the verificationget diagnostic() {return JSON.stringify(this.model);}}
and add diagnostic
binding near the top of the form
{{diagnostic}}<div class="form-group">// FormControls goes here</div>
May 06, 2022
166
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular