Skip to content

MenuSettings

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

Menu data mock

MenuSettings contains mock menu data for the client settings area. Its CompareUrl() method returns a boolean used to check whether a menu item matches the current URL context.

Methods

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

Properties

PropertyType
rootany

Diagram

mermaid
graph LR
  MenuSettings --> MenuData[Mock menu data]
  MenuSettings --> CompareUrl[CompareUrl()]
  CompareUrl --> MatchResult[boolean match result]
  MatchResult --> MenuState[Active menu state]

Usage

ts
import { MenuSettings } from "./menu.settings-old";

const menuSettings = new MenuSettings();

const isCurrentMenuUrl = menuSettings.CompareUrl();

if (isCurrentMenuUrl) {
  // Mark the related menu entry as active.
}

AI Coding Instructions

  • Keep menu mock data aligned with the settings navigation structure used by the client.
  • Treat CompareUrl() as the URL matching point for active menu state.
  • Preserve the boolean return contract when changing CompareUrl().
  • Check callers before changing menu data shape or URL comparison behavior.

Was this page helpful?

Download as PDF