MCPcopy Create free account
hub / github.com/angular/components / PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER

Function PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER

src/cdk/menu/menu-stack.ts:37–43  ·  view source on GitHub ↗
(
  orientation: 'vertical' | 'horizontal',
)

Source from the content-addressed store, hash-verified

35
36/** Provider that provides the parent menu stack, or a new inline menu stack if there is no parent one. */
37export const PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER = (
38 orientation: 'vertical' | 'horizontal',
39) => ({
40 provide: MENU_STACK,
41 useFactory: () =>
42 inject(MENU_STACK, {optional: true, skipSelf: true}) || MenuStack.inline(orientation),
43});
44
45/** Options that can be provided to the close or closeAll methods. */
46export interface CloseOptions {

Callers 1

menu.tsFile · 0.90

Calls 1

inlineMethod · 0.80

Tested by

no test coverage detected