abp icon indicating copy to clipboard operation
abp copied to clipboard

[Angular] The Administration menu cannot be removed.

Open snowchenlei opened this issue 3 weeks ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Description

I removed the Administration menu from the document view, but it's still there.

function configureRoutes() {
  const routes = inject(RoutesService);
  console.log(routes);

  routes.removeByParam({ name: eThemeSharedRouteNames.Administration });
  routes.add([
    {
      path: '/',
      name: '::Menu:Home',
      iconClass: 'fas fa-home',
      order: 1,
      layout: eLayoutType.application,
    },
  ]);
  routes.add([
    {
      path: '/',
      name: '::Menu:Home1',
      iconClass: 'fas fa-home',
      order: 1,
      layout: eLayoutType.application,
    },
  ]);
}
Image

Reproduction Steps

  1. abp new
  2. add code in route.provider.ts
  3. yarn start

Expected behavior

The Administration menu has been removed.

Actual behavior

still there.

Regression?

No response

Known Workarounds

No response

Version

10.0

User Interface

Angular

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

snowchenlei avatar Dec 04 '25 08:12 snowchenlei

Hello @snowchenlei, Could you please check this comment https://github.com/abpframework/abp/issues/24031#issuecomment-3436226396 on a previously closed issue that may help?

sumeyyeKurtulus avatar Dec 04 '25 10:12 sumeyyeKurtulus

Hello @snowchenlei, Could you please check this comment #24031 (comment) on a previously closed issue that may help?

This works well and solves my issue. It might be worth considering adjusting the generated template to prevent this issue?

snowchenlei avatar Dec 16 '25 06:12 snowchenlei

I am glad to hear that this has solved your problem, so I am closing this issue for the time being. Thank you for your cooperation.

sumeyyeKurtulus avatar Dec 16 '25 06:12 sumeyyeKurtulus