Angular is a popular open-source web application framework maintained by Google. It uses TypeScript and provides a complete solution for building single-page applications (SPAs), including routing, forms, HTTP client, and dependency injection out of the box.
Why Angular?
- Batteries included - routing, forms, HTTP, and testing tools ship with the framework
- TypeScript first - strong typing catches errors early
- Component-based architecture - build reusable UI pieces
- Backed by Google - long-term support and regular releases
Installation
Make sure you have Node.js installed, then install the Angular CLI globally:
npm install -g @angular/cliVerify the installation:
ng versionCreate Your First App
ng new my-first-app
cd my-first-app
ng serveOpen http://localhost:4200 in your browser and you will see the default Angular welcome page.
Project Structure
my-first-app/
├── src/
│ ├── app/ # components, services, modules
│ ├── main.ts # application entry point
│ └── index.html
├── angular.json # workspace configuration
└── package.jsonYour First Component
Generate a component with the CLI:
ng generate component helloThis creates four files: a TypeScript class, an HTML template, a CSS file, and a test file. Use the component in your app by adding its selector to a template:
<app-hello></app-hello>Next Steps
Once you are comfortable with the basics, explore data binding, directives, services, and the Angular Router. The official documentation at angular.dev is an excellent resource.
Happy coding!