Angular Multi Application Project Creation
Piyali Das
11+ yrs | Angular (Core + Material UI + AgGrid) | Nx Monorepo | NGRX | RXJS | GraphQL | TypeScript | JavaScript | SASS
- If your installed Angular global version is different and you want to create different version Angular application. Here my angular global version is 6. I am creating application with version 10.
npx -p @angular/[email protected] ng new multiple-application --create-application=false
If you have latest angular global version. Just write the syntax
ng new multiple-application --create-application=false
The --create-application=false parameter avoids the creation of an initial application (default value is true). Otherwise, the Angular CLI creates an application in the src folder of the new workspace.
Now you will get the files and folders the Angular Workspace :
- angular-apps/README.md for introductory documentation,
- angular-apps/angular.json for the CLI configuration for build, serve, and test tools of all projects in the workspace,
- angular-apps/package.json for npm configuration. Check out npm documentation for more details,
- angular-apps/tsconfig.json for TypeScript configuration,
- angular-apps/tslint.json for TSLint configuration,
- angular-apps/.editorconfig for the configuration of code editors. See EditorConfig,
- angular-apps/.gitignore for specifying files that should be ignored by Git.
2. Now i am creating two applications in an existing workspace :
ng g application frontend ng g application admin
You can see two projects (admin, frontend) in projects folder and in angular.json.
in defaultProject of angular.json, you can see the "frontend". By default "localhost:4200" will run frontend application.
Sr. Frontend Developer - Angular, React.js and Next.js
4 年Really useful...