πŸ“Š Angular
Q. Which type of data binding uses square brackets?
  • (A) Property binding
  • (B) Event binding
  • (C) Two-way binding
  • (D) Interpolation
πŸ’¬ Discuss
βœ… Correct Answer: (A) Property binding

Explanation: Square brackets `[]` are used for property binding.

πŸ“Š Angular
Q. What is the correct syntax for two-way data binding?
  • (A) [(ng-bind)]
  • (B) [[ngModel]]
  • (C) [(ngModel)]
  • (D) {(ngModel)}
πŸ’¬ Discuss
βœ… Correct Answer: (C) [(ngModel)]

Explanation: Two-way binding in Angular is done using [(ngModel)].

πŸ“Š Angular
Q. Which file contains the metadata for an Angular project?
  • (A) angular.json
  • (B) package.json
  • (C) app.module.ts
  • (D) main.ts
πŸ’¬ Discuss
βœ… Correct Answer: (A) angular.json

Explanation: angular.json contains configuration metadata for the Angular project.

πŸ“Š Angular
Q. Which Angular package is needed for routing?
  • (A) @angular/router
  • (B) @angular/forms
  • (C) @angular/platform-browser
  • (D) @angular/common
πŸ’¬ Discuss
βœ… Correct Answer: (A) @angular/router

Explanation: @angular/router is required for implementing routing in Angular apps.

πŸ“Š Angular
Q. What is a module in Angular?
  • (A) A class that manages routes
  • (B) A function that handles events
  • (C) A container for components, directives, and services
  • (D) A built-in directive
πŸ’¬ Discuss
βœ… Correct Answer: (C) A container for components, directives, and services

Explanation: Modules are containers that group related components and services.

πŸ“Š Angular
Q. Which command is used to start the Angular development server?
  • (A) ng make
  • (B) ng start
  • (C) ng serve
  • (D) ng build
πŸ’¬ Discuss
βœ… Correct Answer: (C) ng serve

Explanation: The `ng serve` command is used to start the Angular development server.

πŸ“Š Angular
Q. What is the purpose of the RouterModule?
  • (A) To define animations
  • (B) To manage forms
  • (C) To enable routing in the app
  • (D) To handle HTTP requests
πŸ’¬ Discuss
βœ… Correct Answer: (C) To enable routing in the app

Explanation: RouterModule is used to configure and manage routing in Angular.

πŸ“Š Angular
Q. How do you pass data to a child component?
  • (A) Using @Inject
  • (B) Using @ViewChild
  • (C) Using @Input
  • (D) Using @Output
πŸ’¬ Discuss
βœ… Correct Answer: (C) Using @Input

Explanation: Data is passed to child components using the @Input decorator.

πŸ“Š Angular
Q. What does the async pipe do in Angular?
  • (A) Transforms strings to lowercase
  • (B) Subscribes to Observables or Promises
  • (C) Handles routing
  • (D) Manages HTTP requests
πŸ’¬ Discuss
βœ… Correct Answer: (B) Subscribes to Observables or Promises

Explanation: The async pipe automatically subscribes and unsubscribes from Observables.

πŸ“Š Angular
Q. Which module is used for template-driven forms?
  • (A) ReactiveFormsModule
  • (B) TemplateFormsModule
  • (C) FormsModule
  • (D) NgFormModule
πŸ’¬ Discuss
βœ… Correct Answer: (C) FormsModule

Explanation: FormsModule is used for creating template-driven forms in Angular.