Hello, you can use this key
eThemeLeptonXComponents.MobileNavbarSettings
to manage the mobile navbar settings.
It works. Thank you.
May I also ask how you have added the FAQ component that would result in a scroll problem?
home.component.ts <a [routerLink]="'/faq'" class="btn btn-primary">FAQ</a>
app-routing.module.ts { path: 'faq', loadChildren: () => import('./faq/faq.module').then(m => m.FaqModule) },
faq-routing.module const routes: Routes = [{ path: '', component: FaqComponent }];
This was supposed to be fixed but it's not :
https://abp.io/support/questions/8061/How-can-I-easily-hide-the-bottom-right-menu-items-in-Angular
And another one : Page scroll position doesn't reset to top when navigating between custom pages using routerLink :
<a [routerLink]="'/faq'">
My goal is not to rewrite the whole mobile navigation bar, just to remove a menu for both desktop and mobile.
Others have asked for mobile menu customization recently : https://abp.io/support/questions/7933/Mobile-menu-for-LeptonX-theme-modifications
Thank you
Well it makes some sense :
I had no tenant so the "standard" subscription was neither attached to any tenant nor to the host.
Hence it only worked when changing host settings and not the "standard" subscription settings.
When I create a tenant, assign it the standard edition and then login under a user that belongs to this tenant, it works.
Since we are not using tenants or subscriptions, I'll stick with the host settings.
I was accessing features through Saas > Editions > Standard > Actions > Features (which changes the features of the standard edition, Not the host)
Whereas the correct path is Settings > Feature management > Manage host features
I can reproduce in incognito mode as well.
How can I send you a minimal test project ?
Create a FeatureDefinitionProvider class in Application.Contracts :
using MyApp.Localization;
using Volo.Abp.Features;
using Volo.Abp.Localization;
using Volo.Abp.Validation.StringValues;
namespace MyApp.Features
{
public class MyAppFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var myGroup = context.AddGroup("MyApp");
myGroup.AddFeature(
"MyApp.MyFeature",
defaultValue: "false",
displayName: LocalizableString
.Create<MyAppResource>("SomeFeature"),
valueType: new ToggleStringValueType()
);
}
}
}
Enable the feature :
Refresh the page then get the feature. I expect it to be 'true' but it's always false.
First I tried in route.provider.ts
import { ConfigStateService, RoutesService, eLayoutType } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';
export const APP_ROUTE_PROVIDER = [{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService, ConfigStateService], multi: true }];
function configureRoutes(routes: RoutesService, config: ConfigStateService) {
return () => {
routes.add([
//...
{
path: '/mymy',
name: '::Menu:MyFeature',
iconClass: 'fas fa-whatever',
order: 3,
parentName: '::Menu:MyParent',
layout: eLayoutType.application,
//requiredPolicy: 'MyApp.MyFeature', // ---> Doesn't work (I guess it only works with permissions)
//invisible: config.getFeature('MyApp.MyFeature') != 'false',// ---> Always 'false'
},
]);
};
}
Second in app.component.ts :
import { Component } from '@angular/core';
import { NavItemsService, UserMenuService } from '@abp/ng.theme.shared';
import { eThemeLeptonXComponents, eUserMenuItems } from '@volosoft/abp.ng.theme.lepton-x';
import { ConfigStateService, ReplaceableComponentsService, RoutesService } from '@abp/ng.core';
@Component({
selector: 'app-root',
template: `
<abp-loader-bar></abp-loader-bar>
<abp-dynamic-layout></abp-dynamic-layout>
<abp-gdpr-cookie-consent></abp-gdpr-cookie-consent>
`,
})
export class AppComponent {
constructor(
private replaceComponent: ReplaceableComponentsService,
private config: ConfigStateService,
private routes: RoutesService,
) {
let myFeature = this.config.getFeature('MyApp.MyFeature'); // ---> Always 'false'
if (myFeature === 'false') {
this.routes.remove(['::Menu:MyFeature']);
}
}
}