angular-cn/packages/forms/src/directives/control_container.ts

34 lines
758 B
TypeScript
Raw Normal View History

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2016-06-08 15:36:24 -07:00
import {AbstractControlDirective} from './abstract_control_directive';
import {Form} from './form_interface';
2016-06-08 15:36:24 -07:00
/**
* A directive that contains multiple `NgControl`s.
2016-06-08 15:36:24 -07:00
*
* Only used by the forms module.
*
*
2016-06-08 15:36:24 -07:00
*/
export abstract class ControlContainer extends AbstractControlDirective {
// TODO(issue/24571): remove '!'.
name !: string;
2016-06-08 15:36:24 -07:00
/**
* Get the form to which this container belongs.
*/
get formDirective(): Form|null { return null; }
2016-06-08 15:36:24 -07:00
/**
* Get the path to this container.
*/
get path(): string[]|null { return null; }
2016-06-08 15:36:24 -07:00
}