Class

NgxBaseComponent

(protected) EmptyStateComponent#NgxBaseComponent(instance)

Constructor

# protected new NgxBaseComponent(instance)

Initializes a new instance of the base component with the provided instance token. This constructor sets up the fundamental properties required by all Decaf components, including the component name, locale settings, and logging capabilities. The instance token is used for component identification and locale derivation.

The constructor performs the following initialization steps:

  1. Sets the componentName from the provided instance token
  2. Derives the componentLocale from the class name using utility functions
  3. Initializes the logger instance for the component

Creates an instance of NgxBaseComponent.

sequenceDiagram participant A as Angular participant C as Component participant B as NgxBaseComponent participant U as Utils participant L as Logger A->>C: new Component(instance) C->>B: super(instance) B->>B: Set componentName = instance B->>U: getLocaleFromClassName(instance) U-->>B: Return derived locale B->>B: Set componentLocale B->>L: getLogger(this) L-->>B: Return logger instance B->>B: Set logger
Parameters:
Name Type Description
instance string

The component instance token used for identification

Overrides:

View Source lib/engine/NgxBaseComponent.ts, line 1024