Abstract
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
Protected
Abstract
controlBind this to your inner form control to make all the magic happen.
An observable that emits once when this object is destroyed, then completes.
Call this to emit a new value when it changes.
Emits the set of @Input()
property names that change during each call to ngOnChanges()
.
You can bind to this in your template as needed.
Call this to "commit" a change, traditionally done e.g. on blur.
Binds an observable to one of this directive's instance variables. When the observable emits the instance variable will be updated, and change detection will be triggered to propagate any changes. Use this as an alternative to repeating | async
multiple times in your template.
an observable of the values for one of this directive's @Input()
properties
Protected
innerProtected
innerProtected
outerOverride this to modify validation errors that synchronize in to this component.
In this example we assume the required
validation is handled by the user and should not affect internal validation
protected override outerToInnerErrors(
errors: ValidationErrors,
): ValidationErrors {
return omit(errors, 'required');
}
For more complex needs, see #setUpOuterToInnerErrors$ instead.
Protected
outerProtected
setOverride this to for full control over the stream of validation errors synchronized out from your subclass.
In this example, synchronization is turned off:
protected override setUpInnerToOuterErrors$(): Observable<ValidationErrors> {
return EMPTY;
}
For a simple transformation, see #innerToOuterErrors instead.
Protected
setOverride this to for full control over the stream of values emitted from your subclass.
In this example, illegal values are not emitted
setUpInnerToOuterValue$(inner$: Observable<InnerType>): Observable<OuterType> {
return inner$.pipe(
filter((inner) => isLegalValue(outer)),
);
}
For a simple transformation, see #innerToOuterValue instead.
Protected
setOverride this to for full control over the stream of validation errors synchronized in to your subclass.
For a simple transformation, see #outerToInnerErrors instead.
Protected
setOverride this to for full control over the stream of values passed in to your subclass.
In this example, incoming values are debounced before being passed through to the inner form control
setUpOuterToInnerValue$(outer$: Observable<OuterType>): Observable<InnerType> {
return outer$.pipe(
debounce(300),
map((outer) => doExpensiveTransformToInnerValue(outer)),
);
}
For a simple transformation, see #outerToInnerValue instead.
Optional
next: ((value) => void)Optional
error: ((error) => void)Optional
complete: (() => void)Static
assignCopy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
The target object to copy to.
The source object from which to copy properties.
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
The target object to copy to.
The first source object from which to copy properties.
The second source object from which to copy properties.
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
The target object to copy to.
The first source object from which to copy properties.
The second source object from which to copy properties.
The third source object from which to copy properties.
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
The target object to copy to.
Rest
...sources: any[]One or more source objects from which to copy properties
Static
createCreates an object that has the specified prototype or that has null prototype.
Object to use as a prototype. May be null.
Creates an object that has the specified prototype, and that optionally contains specified properties.
Object to use as a prototype. May be null
JavaScript object that contains one or more property descriptors.
Static
defineAdds one or more properties to an object, and/or modifies attributes of existing properties.
Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
Static
defineAdds a property to an object, or modifies attributes of an existing property.
Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
The property name.
Descriptor for the property. It can be for a data property or an accessor property.
Static
entriesReturns an array of key/values of the enumerable properties of an object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns an array of key/values of the enumerable properties of an object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Static
freezePrevents the modification of existing property attributes and values, and prevents the addition of new properties.
Object on which to lock the attributes.
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Object on which to lock the attributes.
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Object on which to lock the attributes.
Static
fromReturns an object created by key-value entries for properties and methods
An iterable object that contains key-value entries for properties and methods.
Returns an object created by key-value entries for properties and methods
An iterable object that contains key-value entries for properties and methods.
Static
getGets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
Object that contains the property.
Name of the property.
Static
getReturns an object containing all own property descriptors of an object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Static
getReturns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
Object that contains the own properties.
Static
getStatic
getStatic
hasStatic
isStatic
isStatic
isStatic
isStatic
keysReturns the names of the enumerable string properties and methods of an object.
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns the names of the enumerable string properties and methods of an object.
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Static
preventStatic
sealStatic
setStatic
valuesReturns an array of values of the enumerable properties of an object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns an array of values of the enumerable properties of an object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Generated using TypeDoc
Extend this when creating a form component that simply wraps existing ones, to reduce a lot of boilerplate.
The most common case is to use a simple FormControl:
Example when you need to modify the wrapped control's value:
Example of wrapping multiple inner components:
If you bind to your component using an NgControl (e.g. when using
ngModel
), validation errors will be synchronized between it and the control inside your component. You can override various methods below to control or disable that process. Note that validation,statuschanges
, andvaluechanges
may all happen more often as a result of this synchronization.