Angular Utility Library | ng-hub-ui-utils

Angular utility library with pipes, focus management, overlays, transitions and translation helpers shared across reusable UI components.

API reference

Here's the full contract for utils: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial utils in with 4 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
HubTranslationServiceService-Injectable service for managing translations. Methods: getTranslation(), setTranslations()
HubOverlayServiceService-Service for creating and managing overlays programmatically
HubPopupServiceService-Simplified service for creating popup elements
TooltipDirectiveDirective-Directive ([tooltip]) that shows a positioned, themeable tooltip on hover/focus. Inputs: tooltip (text), placement, delay, offset.

Outputs

React to what utils does — 7 events to hook your logic onto.

NameTypeDescription
TranslatePipePipeTranslates a key using HubTranslationService. Usage: {{ "key" | translate }}
GetPipePipeGets nested property value. Usage: {{ object | get:"path.to.property" }}
IsStringPipePipeChecks if value is a string. Usage: {{ value | isString }}
IsObjectPipePipeChecks if value is an object. Usage: {{ value | isObject }}
IsObservablePipePipeChecks if value is an Observable. Usage: {{ value | isObservable }}
UcfirstPipePipeCapitalizes first letter. Usage: {{ "hello" | ucfirst }} → "Hello"
UnwrapAsyncPipePipeUnwraps Observable or Promise values in templates

Templates

Make it yours — 4 template slots let you project custom markup.

NameDescriptionExample
hubFocusTrap()Traps keyboard focus within an element. Useful for modals and dialogs.hubFocusTrap(zone, element, stopFocusTrap$, refocusOnClick)
interpolateString()Replaces {{ placeholders }} with values from an objectinterpolateString("Hello {{name}}", { name: "World" }) → "Hello World"
getValue()Gets nested property using dot notationgetValue(obj, "user.profile.name")
equals()Deep equality comparison for objects and arraysequals({ a: 1 }, { a: 1 }) → true