Property decorator: amend decorated property to turn it into a managed child component reference of given type. Also presets bindings from given component type on the parent component (see
Component.presetBoundComponent(), which allows for greater control of the resulting bindings).
This asserts a parent-child ‘composition’ dependency between the referrer and the referenced object(s):
This property can only be assigned a reference to a
Componentinstance of given type.
When the parent is destroyed, all children are also destroyed.
When the decorated property is set to another object, the previously referenced object is destroyed.
When the referenced object is assigned to another managed child reference (or list, map, or reference instance that is a child object), the decorated property is set to undefined.
Note: : The component type parameter is optional, this decorator can be used both on its own or with a class parameter.