2015-04-19 13:53:18 -07:00
2015-04-22 08:06:51 -07:00
p.location-badge.
2015-06-01 22:51:00 -07:00
exported from <a href='../forms'>angular2/forms</a>
2015-06-19 12:08:22 -07:00
defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/forms/model.ts#L254-L313">angular2/src/forms/model.ts (line 254)</a>
2015-04-19 13:53:18 -07:00
:markdown
Defines a part of a form, of variable length, that can contain other controls.
2015-06-01 22:51:00 -07:00
A `ControlArray` aggregates the values and errors of each <a href='Control-class.html'><code>Control</code></a> in the group. Thus, if
one of the controls
in a group is invalid, the entire group is invalid. Similarly, if a control changes its value,
the entire group
2015-04-20 13:57:43 -07:00
changes as well.
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular,
along with
<a href='Control-class.html'><code>Control</code></a> and <a href='ControlGroup-class.html'><code>ControlGroup</code></a>. <a href='ControlGroup-class.html'><code>ControlGroup</code></a> can also contain other controls,
but is of fixed
2015-04-20 13:57:43 -07:00
length.
2015-04-19 13:53:18 -07:00
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
2015-06-19 12:08:22 -07:00
constructor(controls: List<AbstractControl>, validator?: Function)
2015-04-19 13:53:18 -07:00
:markdown
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 controls
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 at
2015-04-19 13:53:18 -07:00
2015-06-19 12:08:22 -07:00
pre.prettyprint
code.
at(index: number)
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 push
2015-04-19 13:53:18 -07:00
pre.prettyprint
code.
2015-06-19 12:08:22 -07:00
push(control: AbstractControl)
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 insert
2015-04-19 13:53:18 -07:00
2015-06-19 12:08:22 -07:00
pre.prettyprint
code.
insert(index: number, control: AbstractControl)
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 removeAt
2015-04-19 13:53:18 -07:00
pre.prettyprint
code.
2015-06-19 12:08:22 -07:00
removeAt(index: number)
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00
.l-sub-section
2015-06-19 12:08:22 -07:00
h3 length
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00