Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(@abp/ng.core) How to reset layout in lazy load module #3297

Closed
yinchang0626 opened this issue Mar 22, 2020 · 1 comment
Closed

(@abp/ng.core) How to reset layout in lazy load module #3297

yinchang0626 opened this issue Mar 22, 2020 · 1 comment

Comments

@yinchang0626
Copy link
Contributor

@mehmet-erim
It is very great about DynamicLayoutComponent,
I know i should set layout types in CoreModule,

    CoreModule.forRoot({
      environment,
      requirements: {
//not just in core module ,but also other lazy module need to change their layouts
        layouts: LAYOUTS,
      },
    }),

But in my situation,I need to change layouts definition in Lazy Load Module:
Is there any way to do it now?
I think if we add a action for modify Config.State.requirements just like SetEnvironment(#2822).
does DynamicLayoutComponent works fine?

By the way ,
In Route, layout property is enum type ,we can define just three kinds of layout,
If let it be a string,we can add other custom layouts, DynamicLayoutComponent will be more flexibility

  export interface Route {
    children?: Route[];
    invisible?: boolean;
    layout?: eLayoutType//| string;
    name: string;
    order?: number;
    parentName?: string;
    path: string;
    requiredPolicy?: string;
    iconClass?: string;
  }
export const enum eLayoutType {
  account = 'account',
  application = 'application',
  empty = 'empty',
}

So ,I hope:
1.add SetRequirements action for Config.State
2.let layout of Route type be eLayoutType | string
thank you.

@mehmet-erim
Copy link
Contributor

Each ABP theme module has 3 layouts named; application, account, and empty. We designed the layout structure with this rule.

We'll change the layout definition a little bit. requirements property probably will be deprecated.
Please follow the this issue: #3171

You can replace a layout easily in the v2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants