Angular - 1.4 First application part 1
In this video we build our very first Angular application. To do so, we'll use the official Angular CLI (Command Line Interface). The CLI is the recommended way to create Angular projects because they involve many folders, sub-folders, and generated files that must exist from the start. Creating them by hand would be tedious, error-prone, and pointless — a single CLI command does it all.
Before installing the Angular CLI, we need Node.js and npm. Why Node.js for an Angular course? Because Angular uses Node.js under the hood for several of its tasks. We'll also need npm (Node Package Manager), which is shipped together with Node.js, to install modules and libraries.
Install Node.js depending on your OS
- Windows / macOS: download from the official Node.js page; the homepage auto-detects your OS and recommends the LTS (Long Term Support) version — choose LTS for stability
- macOS: a .pkg file opens an installer wizard — click Next through the dialogs and accept the license
- Windows: same wizard; accept the optional installation of build tools (Chocolatey, Python, Visual Studio) which Node.js needs internally
- Linux: open a terminal (Ctrl+Alt+T) and run
sudo apt-get updatethensudo apt-get install nodejs npm
Once installed, open a terminal — on Windows, search for "cmd" and run it as Administrator to avoid permission issues when npm needs to install global packages. Verify the installation by running node -v (should display the Node version, e.g. 13.10.16) and npm -v (e.g. 6.13.7). If either command returns "command not found", the installation didn't succeed and needs to be redone. In the next video, we'll continue by installing the Angular CLI and finally creating our first project.
Summary
This lesson covers the essential prerequisites and setup required before building your first Angular application. It introduces the Angular CLI (official command-line interface) as the recommended tool for project creation, then guides you through installing Node.js and npm on Windows, macOS, and Linux platforms. The lesson emphasizes why these tools are necessary and how to verify successful installation using terminal commands.
Key points
- Angular CLI is the official command-line interface that generates a pre-configured Angular project structure automatically, saving time and preventing manual errors
- Node.js is required for Angular development as the framework uses it under the hood for various tasks during development
- npm (Node Package Manager) comes bundled with Node.js installation and is essential for managing project dependencies and libraries
- The LTS (Long Term Support) version of Node.js is recommended over the latest version for better stability and extended support
- Installation procedures differ by operating system: Windows and macOS use graphical installers, while Linux typically uses package managers like apt-get
- Verify successful installation by running `node -v` and `npm -v` commands in your terminal to check version numbers
FAQ
Why is Node.js necessary for Angular development?
Angular uses Node.js under the hood for certain tasks and development processes. Node.js provides the runtime environment that allows the Angular CLI and npm to function properly during development, making it a mandatory prerequisite.
What is npm and what role does it play in Angular projects?
npm (Node Package Manager) is a package manager installed automatically with Node.js. It allows developers to install, manage, and update the various libraries and modules required for Angular projects.
Why should I use the LTS version of Node.js instead of the latest version?
The LTS (Long Term Support) version provides extended support and greater stability compared to the latest release version, ensuring your development environment remains reliable and supported for a longer period.