Preparation

The following steps need to be taken to prepare for the Angular Training.

(Press '>' in the bottom right corner to continue...)

Install Node.js

  • Download and install the LTS version (18.x) from https://nodejs.org/en/.
  • After the installation check in the command line
    • node --version returns the version (18.x)
    • npm --version returns the version (9.x)

Install Visual Studio Code

  • Download and install Visual Studio Code from https://code.visualstudio.com/
  • Open VS Code
  • Select "Extensions" (the symbol on the bottom on the left side)
  • Install the "Angular Language Service" (https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)

Install Angular Command Line Interface

  • In the command line run npm install -g @angular/cli@latest
  • ng version should print the installed version (16.x.x)
  • If not, ensure that %APPDATA%/npm is set inside your PATH environment variable

Install Git

Download and install git from https://git-scm.com/downloads
After the installation the git bash (bash emulator for Windows) should be availabe
If you open the bash and call git --version the according version should be displayed

Now you can navigate a folder of your choice using the bash
Please enter the following commands to clone the repository, checkout the project seed branch and download the dependencies.

git clone https://github.com/devonfw/devon4ng-training
cd devon4ng-training
git checkout exercise/1-project-seed
npm install

Run the application

Start the application. The following command starts the angular application and a mock backend that you will need for the HTTP exercise

npm run start

You might get an error saying that you can't run scripts, because they are disabled on your system. In this case you need to run the following command in a powershell and try again

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Menti

For Groups

  • In Visual Studio Code install the Extension "Live Share" (https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare)
  • Try out the sharing with your partner. You need to sign in with Github or Microsoft account. One person shares the other one joins

You can't push to the Github repo. To share the code with your group you can use

git format-patch <commit-hash of last pushed commit>
This will create a patch in the "/patch" directory. You can send it to your team. Your team mate(s) can apply the patch to their own local repo using the command
git am <file name>