Open Closed

New Component Not Loading As Application Layout #8024


User avatar
0
raltinsoy created
  • ABP Framework version: 8.2.1
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): No

I create new component. But the component loads without Menu. So, routing is not working properly. How can i load the component with left side menu.

Let me give you more details.

I created ticket-card.component.ts and ticket-card.component.html files.

Then, added these lines to app-routing.module.ts

It does not load with left side menu but when I add TICKET_CARD_ROUTES into menu router, it loads with menu and works fine.

But I do not want to add into menu. Could you help me?


5 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    In my example I have added component 'cart' , I have added below code in app.routing.module.ts

    and when I route to the url localhost:4200/cart it renders like this along with side menu

    Thanks,

  • User Avatar
    0
    raltinsoy created

    Hello, thank you for your response. I found the cause of routing problem. I also have TicketModule and nested routing does not load along with side menu.

    localhost:4200/tickets-cart works fine.

    localhost:4200/tickets/cart does not work fine.

    How can I solve the problem, when there are nested routings?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    It's strange but the same thing works at my end. I have added the code

    It works fine

    Thanks,

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi again,

    I have added more nested routes like

    and they still works fine

    don't getting what gets wrong at your end.

  • User Avatar
    0
    raltinsoy created

    Hi, I have found the problem. I have tried few cases based on your case. There was not layout: eLayoutType.application line in ticket-route.provider.ts. Thank you for your support.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11