Describe the structure of a basic Angular project.
Model answer
A new project has a src folder with main.ts (the entry point that starts the app), index.html (the single page), styles.css (global styles) and an app folder. In the app folder you will find the root component (app.ts or app.component.ts with its template and styles), app.config.ts (providers such as the router and HTTP client) and app.routes.ts (the route list).
Outside src are angular.json (build settings), package.json (dependencies and scripts) and tsconfig files (TypeScript options).
Tips
- Mention that angular.json controls build and serve options.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.
More questions
- What is Angular, and how is it different from AngularJS?
- What is a single-page application (SPA)?
- What does the Angular CLI do? Name some common commands.
- What is a standalone component, and why did Angular move away from NgModules?
- What is TypeScript, and why does Angular use it?
- What happens when an Angular application starts?