How To Create Angular Project In Existing Folder

Table of Contents

Introduction

In this example I am going to tell you how to create Angular project in existing folder. So, when you create a new Angular application using ng new angular-app command, where angular-app is the application’s or project’s name, then a new folder angular-app gets created.

What if you need to create a new angular app in the existing directory for some reasons. For example, you have created a gradle based project and you want it to be used as an angular app. In this case you need to use command appropriately to use the existing folder for an angular app.

Related Post

Prerequisites

Angular 8+, Npm 5.x, Node 8.x

Angular App with Existing Folder

Here I am going to execute CLI command to create Angular project in existing folder

Let’s assume the existing folder’s name is angular-app and you want it to be used for angular project.

Next you need to navigate to the folder angular-app in CLI window. CLI window is command line interface, which is command prompt in Windows, Shell terminal in Unix system or even you can use Git Bash terminal window.

While you are on the angular-app folder in CLI, execute the following command to create required files and folders inside the angular-app directory.

ng new angular-app --directory=./

Now you will find that the required files and folders have been created under angular-app directory.

Leave a Reply

Your email address will not be published.