Open Closed

Adding new layouts to Angular application #5832 #2223


User avatar
0
mostafa_ibrahem22@hotmail.com created

Adding new layouts to Angular application #5832

https://github.com/abpframework/abp/issues/5832

how make these

// configureLayouts factory in LayoutProvider layouts.add(['admin', 'MyNameSpace.Layouts.AdminLayoutComponent'])

// route provider routes.add([ { ..., name: 'Admin', layout: 'admin', }]

I can't add the next line,please where can add the next line layouts.add(['admin', 'MyNameSpace.Layouts.AdminLayoutComponent'])

after add " layout: 'admin'," show these error Error: projects/main-core/config/src/providers/route.provider.ts:21:9 - error TS2322: Type '"cusomlayout"' is not assignable to type 'eLayoutType'.

21 layout: 'cusomlayout', ~~~~~~

node_modules/@abp/ng.core/lib/models/common.d.ts:59:9 59 layout?: eLayoutType; ~~~~~~ The expected type comes from property 'layout' which is declared here on type 'Route'

  • ABP Framework version: commercial 5.0.0-rc.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

1 Answer(s)
  • User Avatar
    0
    bunyamin created

    Hello,

    As I've explained in the docs, extending layouts (adding new ones) is not available yet. However, you can achieve a similar thing by using eLayoutType.empty.

    Please follow the instructions in this comment

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11