Open Closed

Issue with Creating Angular UI for New Microservice in Abp Microservice-Service-Pro Template with ABP Suite #6664


User avatar
0
nvc_abp_dev4 created
  • ABP Framework version: v8.0.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Sepereated Auth Server (because it is Microservice template)
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

TLDR; I follow the steps in the link. it won't work for Angular UI. https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice

I'm encountering difficulties in creating an Angular library and UI for a new microservice within an ABP Microservice-Service-Pro template using Angular. Here's a detailed breakdown of the issue:

Steps to Reproduce:

1- Project Setup: Created a new project using abp new <solution name> -t microservice-pro -u angular. 2- Adding a New Microservice: Followed the ABP Documentation https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice for adding a new microservice. The process did not generate an Angular library for the new service. 3- Adding Entities with ABP Suite:

  • Observed that creating entities directly in existing services like ProductService (present in the initial template) results or Open ProductService project in ABP Suite and add an Entity like book. (it will create the UI and backend)
  • However, for a new service created using abp new OrderService -t microservice-service-pro, UI generation is not happening.

Expected Behavior:

I expect:

  • Create an Angular library for the newly added microservice or document can describe how to do that (Because I added with ng generate library order-service or ng generate library OrderService it won't create any UI)

  • Creating entity on Angular with UI

  • Bonus: A CLI command for code generation of created entity with ABP Suite like abp generate -t ng ... but for suite like abp suite generate -t ng --entityName Book -target ... If the command exists I can create library with ng cli and I can execute ABP generation but it is optional. I just need I can create entity with suite and the entity produce frontend and backend.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    We plan to fix this in the next patch version. As a solution, you can add the service to your Angular application via ng generate libaray order-service. You will also need to manually add the config folder as a secondary-endpoint.

    Your ticket was refunded.

    Edited by @masumulu [2024-03-26]


    You can use command below instead creating library with upper command

    npx ng generate @abp/ng.schematics:create-lib --package-name order-service --is-secondary-entrypoint false --is-module-template true --override true

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