Skip to main content
cngx-src documentation

createMobileViewportSignal

Functioncommon/stepper

projects/common/stepper/mobile-viewport.ts

Description#

Returns a reactive Signal<boolean> that reflects whether the host window matches a CSS media query (e.g. (max-width: 480px)). Used by <cngx-stepper> to drive its mobile auto-collapse template branch.

In SSR / non-DOM environments the signal stays false and the listener is never wired.

Signature#

createMobileViewportSignal(mediaQuery: string, destroyRef: DestroyRef)

Parameters#

@parammediaQuerystring
@paramdestroyRefDestroyRef

Returns#

Signal