Angular CLI
ng new, ng generate, ng serve, ng build, ng test, configuration, workspaces, schematics, builders
1Which command creates a new Angular project?
Which command creates a new Angular project?
Answer
The ng new command creates a new Angular project with all necessary configuration files (angular.json, tsconfig.json, package.json), automatically installs npm dependencies and initializes a Git repository. This command is the standard starting point for any Angular project and sets up the structure recommended by the Angular team. It also offers interactive options to choose routing, CSS preprocessor and TypeScript strict mode.
2Which command starts the Angular development server?
Which command starts the Angular development server?
Answer
The ng serve command starts the Angular development server with automatic reload (hot reload). It compiles the application in development mode and makes it accessible on localhost:4200 by default. The server watches for TypeScript, HTML and CSS file changes, then automatically recompiles and refreshes the browser for an efficient development workflow. This command uses webpack-dev-server behind the scenes to optimize compilation performance.
3Which file contains the main Angular project configuration?
Which file contains the main Angular project configuration?
Answer
The angular.json file contains all Angular project configuration, including build options, asset paths, environment configurations and builder settings. This central file allows customizing CLI behavior, defining configurations for development and production, configuring global style and script paths, and managing multiple projects in a multi-project workspace. It is the most important file for Angular CLI configuration.
Which command compiles the Angular application for production?
Which command runs unit tests in an Angular project?
+15 interview questions
Other Angular interview topics
TypeScript Basics
TypeScript Advanced
Angular Fundamentals
Components & Lifecycle
Services & Dependency Injection
Angular Modules Organization
Directives & Pipes
Routing & Navigation
Reactive Forms
Template-driven Forms
RxJS Fundamentals
RxJS Operators
HttpClient & API Calls
Basic State Management
Change Detection
Angular Signals
Standalone Components
Angular Unit Testing
End-to-End Testing
Build & Optimization
NgRx Fundamentals
NgRx Advanced
Angular Architecture
Performance Optimization
Security & Best Practices
Advanced RxJS Patterns
Angular Universal & SSR
Angular Micro-frontends
Master Angular for your next interview
Access all questions, flashcards, technical tests, code review exercises and interview simulators.
Start for free