Skip to content

MenuSettings

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/core/app-menu/menu.settings.ts (line 4)

Part of: Pams

Menu data mock

MenuSettings contains mock data for the application menu. Its CompareUrl() method checks the current URL context and returns a boolean that menu code can use when determining navigation state.

Methods

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

Properties

PropertyType
rootany

Diagram

mermaid
graph LR
  MenuSettings[MenuSettings] --> MenuData[Mock menu data]
  MenuSettings --> CompareUrl[CompareUrl()]
  CompareUrl --> Result[boolean URL match result]
  Result --> AppMenu[Application menu]

Usage

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

const menuSettings = new MenuSettings();

const matchesCurrentUrl = menuSettings.CompareUrl();

if (matchesCurrentUrl) {
  // Apply the matching menu state.
}

AI Coding Instructions

  • Keep menu mock data and URL comparison behavior within MenuSettings.
  • Treat CompareUrl() as a boolean check when wiring menu selection or visibility logic.
  • Update dependent menu components when changing the shape of menu data.
  • Avoid duplicating URL matching logic in application menu components.

Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (1)

  • AppMenuComponentPams/Web/Pams.WebApp/Client/app/core/app-menu/app-menu.component.ts:1

Was this page helpful?

Download as PDF