• Reference to another component of the same entity.

    If not optional it is required that the entity is part of the entity and if not optional, that it is in the order before this component.

    Optional components that aren't present will be set to null.


    static requires = {
    cmps: [

    private other1:OtherCmp1;
    private other2?:OtherCmp2;

    onInit() {
    this.other1 = this.findComponent('OtherCmp1');
    if (!this.other1)
    throw new InitError(...);
    this.other2 = this.findComponent('OtherCmp2');


    ```ts @cmp('OtherCmp1') private other1:OtherCmp1;

    @cmp('OtherCmp2', true) private otherCmp2?:OtherCmp2;


    • cmpName: string
    • optional: boolean = false

    Returns ((target: any, memberName: string) => void)

      • (target: any, memberName: string): void
      • Parameters

        • target: any
        • memberName: string

        Returns void

Generated using TypeDoc