docs/en/contribution/angular-ui.md
//[doc-seo]
{
"Description": "Learn how to set up and contribute to Angular UI in the ABP Framework with essential tools, commands, and guidelines for developers."
}
This guide explains how to set up the ABP Angular UI workspace, run the demo app, and prepare your environment to contribute UI changes. It assumes that you are already familiar with basic Angular and .NET development.
Before sending a pull request for Angular UI changes, please also read the main Contribution Guide.
Make sure you have the following tools installed:
This article uses Windows-style paths in examples. On Unix-like systems, replace backslashes (
\) with forward slashes (/).
Examples:
templates\app\aspnet-core\src\MyCompanyName.MyProjectName.DbMigrator\appsettings.jsontemplates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.jsonYou need SQL Server and Redis. You can install these programs without Docker, but the examples below use Docker containers. Your computer should have Docker Engine running. Then open a terminal and execute the commands.
docker run -v sqlvolume:/var/opt/mssql \
-e 'ACCEPT_EULA=Y' \
-e 'SA_PASSWORD=YourStrong!Passw0rd' \
-p 1433:1433 \
-d mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04
YourStrong!Passw0rd with a strong password that satisfies SQL Server password requirements.sqlvolume named volume is used to persist database files.docker run -p 6379:6379 -d redis:latest
After running the commands, you can use docker ps to verify that both containers are running.
Once the containers are ready, you can download the ABP source code and run the apps.
The sample application has:
You will run both the backend and the Angular dev app during development.
The backend root path is templates\app\aspnet-core.
If you are using the Dockerized SQL Server, update the connection strings to point to your Docker container. The configuration file is:
templates\app\aspnet-core\src\MyCompanyName.MyProjectName.DbMigrator\appsettings.jsonEnsure that the connection string uses the correct server name (localhost,1433 by default), user (sa), and your password.
The DbMigrator project creates the initial database schema and seed data.
cd templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator
dotnet run
Wait until the migration completes successfully.
Before running the backend host, install the client-side libraries:
cd templates/app/aspnet-core
abp install-libs
This command restores the required client-side libraries for the backend.
Go to the backend HTTP API host project folder. The exact project name may differ based on your template, but it will be similar to:
templates\app\aspnet-core\src\MyCompanyName.MyProjectName.HttpApi.HostWithIdsRun the host:
cd templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds
dotnet run
After it starts, the backend API will be available on a localhost URL defined in the project (for example, https://localhost:44305, depending on your template).
The Angular workspace is under npm\ng-packs. It is an Nx workspace that contains both the dev app and the Angular UI packages.
npm\ng-packs\apps\dev-appnpm\ng-packs\packages\The dev app uses local references to the packages under packages, so your library changes will be reflected immediately while the dev server is running.
From the dev app folder:
cd npm/ng-packs/apps/dev-app
yarn
# or, if you prefer npm:
# npm install
Choose one package manager (preferably yarn if that is what the repository uses) and stick with it.
yarn start
# or:
# npm start
This will start the Angular dev server (via Nx) and open the dev app in your browser. Ensure that the backend API is running so the dev app can connect to it.
abp install-libs and start the backend HTTP API host.npm\ng-packs\packages\.docker ps).SA_PASSWORD value.nvm) to match the version used in the project.