SWEN-261: Intro to Software Engineering

Setup Angular Environment (individual)

NVM

Install NVM (Node Version Manager) to manage multiple Node.js versions as you may need different ones for different courses.

For Windows,

  • download and install nvm-setup.exe
  • if the installation offers to manage already installed Node.js versions, agree to it
  • start or restart your terminal
  • execute nvm version in a terminal to verify the installation

For MacOS and Linux,

  • execute: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash
  • restart your terminal
  • execute nvm version in a terminal to verify the installation

Node.js

Install Node.js version 20.0.19.0 or higher using NVM so you would be able to compile and run Angular applications for this course.

  • execute nvm ls in a terminal to see if you already have a fitting version installed
  • execute nvm install [version] (e.g., nvm install 26) in a terminal, if you don't
  • execute nvm ls to see the exact version numbers you have and then nvm use [version] to switch to the one you want
  • execute node -v in a terminal to verify the installation

Angular Check

Verify that you can create and run a new Angular application.

  • open a terminal and go to a directory that will contain a directory with your new Angular application (it's a temporary application, you will delete it after the check and submission)
  • execute npx @angular/cli@22 new my-app to create a new directory and install an initial Angular application there
    • Angular of that version will be installed into this specific directory only, you can use other versions for other projects
    • Angular will be installed only into this specific directory, you won't be able to use Angular outside of it
  • consequently, answer y to the prompt asking if you want to proceed, CSS when the installer asks for the stylesheet system, N when the installer asks about SSR and SSG, and None when the installer asks about AI tools
  • execute cd my-app and ng serve to start the development server
  • open http://localhost:4200 in your browser to view the application
    • you can use ng serve --open to open the application in your browser automatically, and Ctrl+C / Cmd+C to stop the server

Submission

Take a screenshot of the running application in your browser, and submit the output to the assignment submission page on myCourses.

After submission, you can stop the application by pressing Ctrl+C or Cmd+C in the terminal and delete the directory with the application.