Hi,
I gave Sümeyye Kurtuluş and liming ma aleardy access to that project
in the Host-Application I used "abp generate-proxy -t ng -m cards" to generate the proxy, but he only generated the sample API and not the actual "AppService" from the module.
I even removed the "SampleController" in the library, hoping the proxy would find its right API.
Just a quick update — I believe the current assumption is that the developer sets up the proxy within the host application, which is then used inside the Angular library (DDD). However, the actual API is exposed via the ModuleXXX.HttpApi.Host through its xxxController, not directly from the host application's IApplicationService.
If that’s the intended setup, it looks ABP Studio didn’t generate the paths.proxy configuration in the tsconfig files for either the host or the module. Because of this, I’m currently running into issues identifying the correct import path.
- Template: app
- Created ABP Studio Version: 1.0.2
- Current ABP Studio Version: 1.0.2
- Tiered: Yes
- Multi-Tenancy: Yes
- UI Framework: angular
- Theme: leptonx
- Theme Style: dark
- Theme Menu Placement: top
- Run Install Libs: Yes
- Progressive Web App: No
- Run Progressive Web App Support: No
- Database Provider: ef
- Database Management System: sqlserver
- Separate Tenant Schema: No
- Create Initial Migration: Yes
- Run Db Migrator: Yes
- Mobile Framework: none
- Public Website: No
- Social Login: Yes
- Include Tests: Yes
- Kubernetes Configuration: Yes
- Distributed Event Bus: rabbitmq
- Use Local References: No
- Optional Modules:
- GDPR
- FileManagement
- TextTemplateManagement
- LanguageManagement
- AuditLogging
- Chat
- OpenIddictAdmin
- Selected Languages: Deutsch (Deuthschland), English, 简体中文, Español, العربية, हिन्दी, Português (Brasil), Français, Русский, Türkçe, Italiano, Čeština, Magyar, Română (România), Svenska, Suomi, Slovenčina, Íslenska, 繁體中文
- Default Language: Deutsch (Deuthschland)
- Create Command: abp new xxx -t app --tiered --ui-framework angular --database-provider ef --database-management-system sqlserver --theme leptonx --without-cms-kit --sample-crud-page --dont-run-bundling -chat -file-management
3 Answer(s)
-
0
- When using ABP's Angular service proxy generation for a DDD/module-based solution, the proxy generator only creates proxies for HTTP APIs that are exposed and discoverable by the backend's API definition endpoint. If your AppService from the "cards" module is not being generated, check the following:
Ensure the AppService is Publicly Exposed
- The AppService must be registered and exposed via the auto API controller system.
- It should be decorated with the appropriate attributes (e.g.,
[RemoteService]
or[ApiController]
if needed) and reside in a namespace that is included in the API definition.
Module Must Be Properly Integrated
- The module (e.g.,
Gaming.Module.Cards
) must be added as a dependency in your Host application and properly configured in the module system.
- The module (e.g.,
Backend Host Must Be Running
- The backend (HttpApi.Host) must be running and accessible when you run
abp generate-proxy
. - If using Visual Studio, do not use IIS Express; run the Host project directly.
- The backend (HttpApi.Host) must be running and accessible when you run
Correct Module Name in Command
- The
-m cards
parameter should match the remote service/module name as registered in your backend. - You can check the available remote service names by visiting
/api/abp/api-definition
on your running backend.
- The
Check API Definition Endpoint
- Visit
https://<your-host>/api/abp/api-definition?includeTypes=true
to verify if your AppService endpoints are listed. If not, the proxy generator will not generate them.
- Visit
Re-run Proxy Generation
- After confirming the above, run:
abp generate-proxy -t ng -m cards
- If you have multiple modules, ensure you specify the correct one.
- After confirming the above, run:
Check for Errors or Warnings
- Review the CLI output for any errors or warnings about missing modules or services.
If your AppService is still not being generated, ensure that:
- The service is not internal/private.
- The module is referenced and loaded in the Host's module dependency tree.
- The service is not excluded by any configuration.
For more details, see:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
Didnt work. take a look at the code.
Write me in private, not in that public place
-
0
Hello, thank you for providing necessary and extra information regarding your problem. I checked your project, however I could not see the module.
!-- removed picture --!
Regardless of the module, I can suggest you to discard
proxy
paths. Here is how paths are generated within the latest version of ABP studio:// angular/tsconfig.json { ... "paths": { "@angular/*": ["node_modules/@angular/*"], "@abp/*": ["node_modules/@abp/*"], "@volo/*": ["node_modules/@volo/*"], "@volosoft/*": ["node_modules/@volosoft/*"], "@swimlane/*": ["node_modules/@swimlane/*"], "@ngx-validate/core": ["node_modules/@ngx-validate/core"], "@ng-bootstrap/ng-bootstrap": ["node_modules/@ng-bootstrap/ng-bootstrap"], "@book-store": ["../modules/bookstore/angular/projects/book-store/src/public-api.ts"], "@book-store/config": [ "../modules/bookstore/angular/projects/book-store/config/src/public-api.ts" ] }, ... }
You can directly use the relative path as follows:
import type { BookStoreEntityOneDto } from '../../../proxy/book-store-entity-ones/models'; import { BookStoreEntityOneService } from '../../../proxy/book-store-entity-ones/book-store-entity-one.service'; export abstract class AbstractBookStoreEntityOneDetailViewService { // ... }
You can let me know if you need further assistance. Thank you for your cooperation.