Skip to main content

Overview

The CometChat Angular UIKit provides a centralized configuration system through the COMETCHAT_GLOBAL_CONFIG injection token. This allows you to set default values for common properties across all UIKit components from a single location, without having to pass the same inputs to every component instance.

Priority System

All configurable properties follow a three-tier priority system:
  1. @Input value (if explicitly set on the component)
  2. GlobalConfig value (from the injection token)
  3. Component’s internal default value
This means you can set a global default and still override it on individual component instances when needed.

Setup

Standalone Application (app.config.ts)

NgModule Application (app.module.ts)

Dynamic Configuration with Factory

Configuration Properties

All properties are optional. When a property is undefined (not set), the component falls back to its own internal default.

Feature Gates

Three properties gate whole features rather than tune a component’s appearance. They behave differently from the rest of the table, so they are worth calling out.

enableThreadSubscription

Defaults to off. The backend exposes no capability flag a client could feature-detect from, so whether the threads endpoints are deployed is something only you know. When off, neither the thread header control nor the action-sheet option renders and no thread request is made — whatever the per-component hideThreadSubscription* inputs say.
See the Thread Subscription guide.

enablePinMessage and enableSaveMessage

These override the features.ux.messages.pinned.enabled and features.ux.messages.saved.enabled app settings, which the Chat SDK reports through CometChat.isPinMessageEnabled() and CometChat.isSaveMessageEnabled(). An explicit value wins; leaving a property unset falls back to the SDK’s answer.
Leave both unset in production. The app’s own settings are the right source of truth. These exist because the flags are provisioned server-side — so before they are switched on for an app, “flag off” is indistinguishable from “not built” and there is no way to develop or demo against the feature.
See the Pin and Save guide.

Call Settings Customization

The callSettingsBuilder property lets you provide a custom CometChatCalls.CallSettingsBuilder that is used across all call-related components. This is useful for configuring call UI features like layout, recording, analytics, or audio-only mode globally.

Global Call Settings

Per-Component Override

Even with a global callSettingsBuilder, you can override it on individual component instances:

Components That Support callSettingsBuilder

Components That Read GlobalConfig

The following components read from COMETCHAT_GLOBAL_CONFIG and apply the three-tier priority system:

Full Example