← Learning Hub
Beginner

Angular Introduction and Setup

Angular is a framework from Google for building full web apps. It gives you everything in one box: components, page routing, forms and tools to build and test. This tutorial uses Angular 20 and TypeScript (JavaScript with types).

Where React is a library for the UI, Angular is a complete framework: it comes with routing, forms, an HTTP client, testing tools and a command-line tool that creates and builds projects. Teams get one standard way of doing things, which is why Angular is popular in large companies, banks and enterprise apps. This very website, Terixto, is built with Angular.

Angular uses TypeScript, which adds types to JavaScript. Types help your editor suggest code and catch mistakes before the app runs - very helpful in big projects with many developers. If you know JavaScript, TypeScript is easy to pick up (see the TypeScript course).

Install and create an app

Install Node.js from nodejs.org first. Then run these commands in a terminal:

Example
npm install -g @angular/cli
ng new my-shop
cd my-shop
ng serve

ng new creates a complete project with the right folder structure, settings and a working starter page. ng serve starts a local development server at port 4200 and rebuilds automatically when you save a file. The Angular CLI (ng) will be your main tool for creating components, services and production builds.

Open http://localhost:4200 in your browser. When you save a file, the page updates by itself.

Angular apps need a build step, so the examples in this tutorial run in your own project created with ng new, not in the Try-it editor. Copy each example into your project to see it work.
Angular and AngularJS are different. AngularJS is the old version from 2010. Everything here is modern Angular.
Key points
  • Angular is a full framework from Google, built with TypeScript.
  • Install the CLI with npm and create apps with ng new.
  • ng serve runs the app at localhost:4200.

📝 Test yourself

1. Which company created Angular?
2. Which language do Angular apps use?
3. Fill in the command that starts the development server:
ng