Open Closed

How to remove the General Settings component? #7841


User avatar
0
huantb1812@gmail.com created
  • ABP Framework version: v8.0.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi team

I’m seeking assistance with removing the General Settings component from my site. I would prefer not to use CSS to hide this section and am looking for an alternative solution. Could you please guide me on how to achieve this?

Thank you,


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a screenshot?

    Would you want to remove it in both angular and MVC?

    Thanks

  • User Avatar
    0
    huantb1812@gmail.com created

    hi

    Can you share a screenshot?

    Would you want to remove it in both angular and MVC?

    Thanks

    I just want to delete it in the Angular project.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will ask our angular team.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Developer

    Hello, if you do not want to use CSS override to hide the settings, you can utilize the component replacement as in this documentation. You can also get a reference to sustain this approach from this explanation.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello huantb1812@gmail.com,

    To remove the setting component at angular end follow below steps -

    • Create a new component which will be replaced with previous setting components using command
    yarn ng generate component nav-items
    
    • After creating this component delete the code from nav-items.component.html file

    • Add below code in app.component.ts

    export class AppComponent implements OnInit {
    
      constructor(private replaceableComponents: ReplaceableComponentsService) {
      }
    
      ngOnInit(): void {
        this.replaceableComponents.add({
          component: NavItemsComponent,
          key: eThemeLeptonXComponents.Settings,
        });
      }
    }
    
    • Now it will replace your previous settings with new nav-items component and will result like

    Thanks,

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13