Open Closed

Scaffold: Extra angular application with all the features, which will be created usually in ABP Studio (language, auth ....) #9394


User avatar
0
starting created

Hello ABP support,

I’m working on a multi-layered ABP solution generated with the ABP CLI and now need to add an extra standalone Angular CLI project alongside it—ideally via a single ABP CLI command or built-in feature so it works seamlessly (authentication, HTTP API proxies, theming) on the first try

Please share the solution with me, so a recommended way to scaffold and configure a second Angular application into an existing layered ABP solution out-of-the-box.

ABP Framework version: v 9.25 UI Type: Angular Database System: EF Core (SQL Server, Tiered (for MVC) or Auth Server Separated (for Angular): yes


20 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, currently, when you have a solution, you can add a DDD module template via ABP Studio UI and select Angular UI:

    When you do that, it will create a new layered application with Angular UI. If you only want to add an angular UI, unfortunately, it's not supported yet.

  • User Avatar
    0
    starting created

    I'm currently developing an ABP web application, specifically working on an external module for it. As part of this, I need to integrate an external class library that has the following characteristics:

    • The library is entirely synchronous and does not offer asynchronous methods.
    • It is not thread-safe.
    • Modifying the library's source code is not an option.

    To safely incorporate this library, I've implemented a wrapper service that serializes access using SemaphoreSlim. This wrapper is registered as a singleton service and is injected into my application services.

    Questions:

    • Is using a singleton wrapper service with SemaphoreSlim the recommended approach in ABP for integrating such libraries?
    • Are there specific considerations or best practices within ABP to ensure thread safety and proper integration in this scenario?
    • Does ABP provide any built-in mechanisms or patterns to facilitate the integration of non-thread-safe, synchronous external libraries?

    `public interface IThreadSafeWrapper { Task

    public class ThreadSafeWrapper : IThreadSafeWrapper, ISingletonDependency { private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1);

    public async Task<string> DoWorkAsync()
    {
        await _semaphore.WaitAsync();
        try
        {
            // Aufruf der nicht threadsicheren Bibliothek
            var result = new Irgendwas().Start();
            return result;
        }
        finally
        {
            _semaphore.Release();
        }
    }
    

    }`

    and

    using System.Threading.Tasks; using Volo.Abp.Application.Services;

    public class MyAppService : ApplicationService { private readonly IThreadSafeWrapper _threadSafeWrapper;

    public MyAppService(IThreadSafeWrapper threadSafeWrapper)
    {
        _threadSafeWrapper = threadSafeWrapper;
    }
    
    public async Task&lt;string&gt; GetResultAsync()
    {
        var result = await _threadSafeWrapper.DoWorkAsync();
        return result;
    }
    

    }

    plus

    public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddSingleton<IThreadSafeWrapper, ThreadSafeWrapper>(); } I appreciate your guidance on this matter.

    Thank you!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The library is entirely synchronous and does not offer asynchronous methods.

    I strongly suggest you use asynchronous methods instead of synchronous methods.


    1. Is using a singleton wrapper service with SemaphoreSlim the recommended approach in ABP for integrating such libraries?
    2. Are there specific considerations or best practices within ABP to ensure thread safety and proper integration in this scenario?
    3. Does ABP provide any built-in mechanisms or patterns to facilitate the integration of non-thread-safe, synchronous external libraries?

    ABP has some extension methods for SemaphoreSlim

    SemaphoreSlim is a basic feature, you can use it freely without considering the ABP limitation.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Core/Volo/Abp/Threading/SemaphoreSlimExtensions.cs#L11-L134

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can upgrade all Microsoft packages in your project to 9.0.4 to solve this.

    Thanks.

  • User Avatar
    0
    starting created

    Is it possible to start the angular project https://abp.io/support/questions/9394/Scaffold-Extra-angular-application-with-all-the-features-which-will-be-created-usually-in-ABP-Studio-language-auth (created with DDD and angular) without starting the main project where the module is installed?

    ...\myNewModule\angular> yarn start Results in: "yarn run v1.22.22 error Command "start" not found."

    ...\myNewModule\angular> ng s Results in: "Cannot determine project or target for command."

  • User Avatar
    0
    masum.ulu created
    Support Team Angular Expert

    [starting] said: Is it possible to start the angular project https://abp.io/support/questions/9394/Scaffold-Extra-angular-application-with-all-the-features-which-will-be-created-usually-in-ABP-Studio-language-auth (created with DDD and angular) without starting the main project where the module is installed?

    ...\myNewModule\angular> yarn start Results in: "yarn run v1.22.22 error Command "start" not found."

    ...\myNewModule\angular> ng s Results in: "Cannot determine project or target for command."

    Hi, we didn't provide angular application to module projects instead imported to host app on the root, yet you can add angular application via ng generate application my-app command after that run yarn ng serve command in module project

  • User Avatar
    0
    starting created

    Hi,

    I created an extra module using the ABP Suite, based on the approach described here: https://abp.io/support/questions/9394/Scaffold-Extra-angular-application-with-all-the-features-which-will-be-created-usually-in-ABP-Studio-language-auth

    All errors were resolved, and the module was successfully installed.

    However, when I try to access the module via the main application's URL, I encounter the following error:

  • User Avatar
    0
    starting created

    Could you please respond?

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, we apologize for the delay. I’ll look into this and get back to you as soon as possible. Thank you for your patience and understanding.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    To help us troubleshoot the module error you're encountering, could you please provide the following additional details:

    1. Routing Setup

      If the problem occurs on navigation, we can troubleshoot these points.

      • Are you lazy-loading the module from the library?
      • If yes, please share the loadChildren statement or the relevant part of your route configuration.
    2. TypeScript Configuration

      • Please share the contents of your application's tsconfig.json and tsconfig.app.json.
      • If you are consuming the library locally, also include tsconfig.base.json (if present) and confirm whether paths are being used for module resolution.

    These details will help us better understand how the library is being resolved and integrated into your application.

  • User Avatar
    0
    starting created

    Are you lazy-loading the module from the library?

    • Yes

    Please share the contents of your application's

    • Module:

    • Main Application:

    • Module:

    • Main Application:

    • ts prod:

    Module-project-structure:

    • Template: app
    • Created ABP Studio Version: 0.9.25
    • Current ABP Studio Version: 1.0.0
    • Tiered: Yes
    • Multi-Tenancy: Yes
    • UI Framework: angular
    • Theme: leptonx
    • Theme Style: system
    • Run Install Libs: Yes
    • Progressive Web App: No
    • Run Progressive Web App Support: No
    • Database Provider: ef
    • Database Management System: sqlserver
    • Separate Tenant Schema: Yes
    • Create Initial Migration: Yes
    • Run Db Migrator: Yes
    • Mobile Framework: none
    • Public Website: No
    • Include Tests: Yes
    • Kubernetes Configuration: Yes
    • Distributed Event Bus: none
    • Use Local References: No
    • Optional Modules:
      • GDPR
      • FileManagement
      • TextTemplateManagement
      • LanguageManagement
      • AuditLogging
      • OpenIddictAdmin
  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Thank you for taking the time to provide these details. Upon reviewing the information, I was unable to identify any misconfiguration that could be causing the issue.

    If you could share a minimal, reproducible example, I would be glad to investigate further. Please feel free to send it to me at: sumeyye.kurtulus@volosoft.com

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello again! Apologies for the delayed response—I just got a moment to reply. Thank you for your patience and cooperation.

  • User Avatar
    0
    starting created

    Hi, I wrote you

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks @starting

    @sumeyye.kurtulus will check and reply asap.

    Thanks

  • User Avatar
    0
    starting created

    I didn't receive a satisfying answer, please return the credits for the entire post, even the deleted ones

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    [starting] said: I didn't receive a satisfying answer, please return the credits for the entire post, even the deleted ones

    The question was closed by our support bot, reopenned it. @sumeyye.kurtulus will check and reply you, so please wait for answer from her. After she writes you back, if you still believe this way then we can reevaulate refunding the credit and deleting the post.

    Regards.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Sure, we have an ongoing email thread, and I will be looking into it as soon as possible.

  • User Avatar
    0
    starting created

    The "ABP Studio Team Edition" rendered the paths wrong, I want the credits for the entire question back

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Refunded. Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on July 17, 2025, 06:22