thern743 / DTDL-Editor

An Angular based front-end for creating digital twin models using Microsoft's Digital Twin Definition Language (DTDL)
MIT License
4 stars 2 forks source link

Each form component should implement OnDestroy lifecycle hook #5

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

Each form-based component implements AbstractCapabilityFormControl.subscribeModelToForm().

These components should call AbstractCapabilityFormControl.onDestroy() to unsubscribe cleanly via the OnDestroy()

component lifecycle hook.

https://github.com/thern743/DTDL-Editor/blob/a2bc30e4e30291a37373c40befd8f7ec258a69e7/src/app/formControls/AbstractCapabilityFormControl.ts#L47


      console.groupEnd();
    }

    // TODO: Each form component should implement OnDestroy lifecycle hook
    //       Each form-based component implements `AbstractCapabilityFormControl.subscribeModelToForm()`. 
    //       These components should call `AbstractCapabilityFormControl.onDestroy()` to unsubscribe cleanly via the OnDestroy()
    //       component lifecycle hook.
    public onDestroy(): void {
      console.groupCollapsed("Unsubscribing");
      this._subscriptions.forEach((sub: Subscription) => sub.unsubscribe());
github-actions[bot] commented 1 year ago

Closed in de8a3f3c91bd479960fa9b7bc1ca3fb5c112e27d