Skip to content

MenuSettings

reference
1 min readUpdated

Kind: Class

Source: Frontend/src/app/components/shared/app-menu/menu.settings.ts (line 7)

Part of: Frontend

MenuSettings manages menu state based on the current URL in the shared application menu. It checks whether a URL matches menu criteria through CompareUrl() and performs URL lookup logic through searchforURL().

Methods

MethodSignatureReturns
CompareUrlCompareUrl(url: string, val: string)boolean
searchforURLsearchforURL(url: string)void

Properties

PropertyType
rootMenuModel[]

Diagram

mermaid
graph LR
  A[Application Menu] --> B[MenuSettings]
  B --> C[searchforURL]
  C --> D[Current URL]
  B --> E[CompareUrl]
  E --> F[Match Result]

Usage

ts
import { MenuSettings } from './menu.settings';

const menuSettings = new MenuSettings();

menuSettings.searchforURL();

const isCurrentMenuUrl = menuSettings.CompareUrl();

if (isCurrentMenuUrl) {
  // Apply the active menu state.
}

AI Coding Instructions

  • Keep URL-related menu logic inside MenuSettings rather than duplicating it in menu components.
  • Call searchforURL() before relying on URL lookup state used by CompareUrl().
  • Preserve the existing method names and casing: CompareUrl() and searchforURL().
  • Confirm URL comparisons account for the application routing format before changing matching behavior.

Relationships

  • IMPORTS → SubscriptionPackagesEnum
  • IMPORTS → MenuModel
  • IMPORTS → AppSettings

Used by

2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (2)

  • AppMenuComponentFrontend/src/app/components/shared/app-menu/app-menu.component.ts:1
  • SideMenuComponentFrontend/src/app/components/shared/side-menu/side-menu.component.ts:1

Was this page helpful?

Download as PDF