Angular is a popular Javascript framework for front-end development. It is opinionated and comes with out-of-the-box tools for building fast and scalable web, desktop, and mobile applications.
To use the Angular framework, you need a basic understanding of the following:
You need to have Node installed on your computer.
To start a new Angular application, you need to:
If you have previously installed the CLI tool, you can skip this step. Otherwise, open a terminal and run the following command:
npm install -g @angular/cli
This command installs the latest version of Angular’s CLI on your computer. With the -g
flag, we can tell npm
to install the CLI globally. This will make it possible to run the CLI command from anywhere on your computer.
You can access the Angular CLI using the ng
keyword.
ng new angular-app
The ng new
command creates a basic Angular app. The CLI prompts you about features to include in your app, installs the necessary dependencies, and configures your project based on your choices.
The bootstrapped app contains a few source and configuration files to help you get developing quickly. Your application code resides in the src
folder of the workspace.
cd angular-appng serve
Go into your project’s root folder using the cd
command and launch the app. The ng serve
command builds the app, starts the development server, watches the source files, and rebuilds the app as you make changes.
To learn more about Angular, visit the official documentation.