Prerequisite

Setup the angular cli

Steps

  1. Create a git repo on github.
  2. Clone the repo.  From the github project page, copy the repo url by clicking on the button “Clone or Download”.  In the bash command line, navigate to the directory that should contain the new project folder and enter the command git clone [the github url] .  This will add a folder to the directory using the repo name.
  3.  Create the angular project through the angular CLI.  From the parent directory, enter the command ng new [project name] –directory [directory created in step 2] .  This will create the files in the local repository created in step 2.
  4. Import the project in IntelliJ. Use File > New > Project from existing sources.
  5. Test the setup.  Navigate to the directory in step 2.  Start a web server through the command ng serve ; this will allow you to open the application on the chrome browser by navigating to http://localhost:4200 and you should see the angular default page.  From IntelliJ, you can modify the file app.component.ts under src/app and change the value assigned to the title variable.  After saving the file change you should see the new title on the browser, updated automatically.