/* * Copyright (c) 2016 VMware, Inc. All Rights Reserved. * This software is released under MIT license. * The full license information can be found in LICENSE in the root directory of this project. */ export const EXAMPLES = { reactiveTS: ` import {Component} from "@angular/core"; import {FormGroup, FormControl, Validators} from "@angular/forms"; @Component({ ... }) export class ReactiveFormsDemo { employeeAddressForm = new FormGroup({ fullName: new FormControl('', Validators.required), address: new FormGroup({ postalCode: new FormControl('', Validators.required), country: new FormControl('', Validators.required) }) }); submitted = false; onSubmit() { ... } addNewEmployeeAddress() { this.employeeAddressForm.reset(); this.submitted = false; } } `, reactiveHTML: `
` };