Question 1: What is Angular?
- A JavaScript library
- A backend framework
- A frontend framework
- A database
Explanation: Angular is a frontend framework used to build web applications.
This beginner-level Angular quiz is designed for learners starting their journey with Angular framework. It covers core fundamentals such as components, modules, templates, data binding, directives, services, and basic CLI concepts—perfect for practice and entry-level interviews.
Explanation: Angular is a frontend framework used to build web applications.
Explanation: Angular is written using TypeScript.
Explanation: Angular is developed and maintained by Google.
Explanation: ng new creates a new Angular project.
Explanation: main.ts bootstraps the Angular application.
Explanation: Components control views (UI) in Angular.
Explanation: @Component is used to define a component.
Explanation: @NgModule organizes application building blocks.
Explanation: app.module.ts defines the root module.
Explanation: Interpolation displays data using {{ }} syntax.
Explanation: Property binding uses square brackets.
Explanation: Event binding uses parentheses.
Explanation: [(ngModel)] enables two-way data binding.
Explanation: *ngFor is used to loop through collections.
Explanation: *ngIf conditionally renders elements.
Explanation: *ngSwitch renders elements based on matching cases.
Explanation: Services contain reusable business logic.
Explanation: @Injectable marks a class as a service.
Explanation: Dependency injection supplies required dependencies.
Explanation: FormsModule provides ngModel.
Explanation: BrowserModule is required for browser apps.
Explanation: ng serve starts the dev server.
Explanation: Angular uses port 4200 by default.
Explanation: angular.json holds project configuration.
Explanation: HttpClient is used for API communication.
Explanation: HttpClientModule provides HTTP services.
Explanation: Templates define the HTML view.
Explanation: Component templates are written in HTML files.
Explanation: Constructor runs first when a component is created.
Explanation: ngOnInit is used for initialization.
Explanation: Routing enables navigation between views.
Explanation: RouterModule enables Angular routing.
Explanation: router-outlet displays routed components.
Explanation: Directives modify DOM behavior.
Explanation: ngClass and ngStyle apply styles dynamically.
Explanation: ngClass dynamically applies CSS classes.
Explanation: ngStyle applies inline styles dynamically.
Explanation: trackBy optimizes ngFor rendering.
Explanation: Change detection updates the view on data change.
Explanation: package.json manages dependencies.
Explanation: ng build creates a build output.
Explanation: --prod creates a production build.
Explanation: Angular CLI is a command-line tool.
Explanation: ng generate component creates a component.
Explanation: ngOnDestroy is used for cleanup.
Explanation: Modules support modular architecture.
Explanation: Angular provides a complete frontend solution.
This beginner-level Angular quiz is designed for learners starting their journey with Angular framework. It covers core fundamentals such as components, modules, templates, data binding, directives, services, and basic CLI concepts—perfect for practice and entry-level interviews.