1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
import { OnDestroy, OnInit } from '@angular/core';
|
9
|
import { AbstractFormGroupDirective } from './abstract_form_group_directive';
|
10
|
import { ControlContainer } from './control_container';
|
11
|
export declare const modelGroupProvider: any;
|
12
|
/**
|
13
|
* @whatItDoes Creates and binds a {@link FormGroup} instance to a DOM element.
|
14
|
*
|
15
|
* @howToUse
|
16
|
*
|
17
|
* This directive can only be used as a child of {@link NgForm} (or in other words,
|
18
|
* within `<form>` tags).
|
19
|
*
|
20
|
* Use this directive if you'd like to create a sub-group within a form. This can
|
21
|
* come in handy if you want to validate a sub-group of your form separately from
|
22
|
* the rest of your form, or if some values in your domain model make more sense to
|
23
|
* consume together in a nested object.
|
24
|
*
|
25
|
* Pass in the name you'd like this sub-group to have and it will become the key
|
26
|
* for the sub-group in the form's full value. You can also export the directive into
|
27
|
* a local template variable using `ngModelGroup` (ex: `#myGroup="ngModelGroup"`).
|
28
|
*
|
29
|
* {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
|
30
|
*
|
31
|
* * **npm package**: `@angular/forms`
|
32
|
*
|
33
|
* * **NgModule**: `FormsModule`
|
34
|
*
|
35
|
* @stable
|
36
|
*/
|
37
|
export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {
|
38
|
name: string;
|
39
|
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
40
|
}
|