Q1
Q1 Which version of Angular marked the shift from AngularJS to Angular?
Angular 2
Angular 4
Angular 5
Angular 6
Q2
Q2 Angular is primarily maintained by which company?
Microsoft
Amazon
Q3
Q3 In Angular, which file is used to define the set of modules, components, and services?
app.module.ts
app.component.ts
angular.json
package.json
Q4
Q4 What does CLI stand for in Angular CLI?
Command Line Interaction
Command Line Interface
Command Language Interpretation
Command Link Interface
Q5
Q5 Which command is used to generate a new component in an Angular project?
ng generate service
ng generate component
ng create component
ng add component
Q6
Q6 To update Angular to a newer version, which command is used?
ng update
ng upgrade
ng new version
ng refresh
Q7
Q7 In Angular, which file is primarily responsible for defining npm packages for the project?
angular.json
package.json
config.json
app.module.ts
Q8
Q8 What is the purpose of the angular.json file in an Angular project?
Define components and services
Set up routing
Configure project-specific settings
List TypeScript files
Q9
Q9 Which command is used to serve an Angular application locally for development?
ng serve
ng start
ng run
ng develop
Q10
Q10 What is the output of the following Angular CLI command:
ng g c my-component --flat?
A new component in a separate folder
A new component in the app folder
A new module
A new service
Q11
Q11 Which Angular CLI command would you use to add Angular Material to your project?
ng add @angular/material
ng install @angular/material
ng generate @angular/material
ng setup @angular/material
Q12
Q12 Identify the correct command to create a new Angular project with SCSS as the stylesheet format.
ng new my-app --style=scss
ng create my-app --scss
ng generate app my-app --style=scss
ng new my-app --css=scss
Q13
Q13 Identify the issue when the Angular CLI command ng serve shows the error "Could not find module "@angular/core" ".
Missing @angular/core module
Incorrect command syntax
Outdated Angular CLI version
Issues with angular.json
Q14
Q14 During project setup, if ng serve fails with the error "Local workspace file ('angular.json') could not be found",
what is the likely issue?
The angular.json file is missing or misplaced
Incorrect Angular version
Syntax error in angular.json
Problems with node_modules
Q15
Q15 What is a component in Angular?
A CSS stylesheet
A routing configuration
A building block of Angular UI
A server-side script
Q16
Q16 Which file extension is used for Angular component templates?
.html
.css
.ts
.js
Q17
Q17 In Angular, how do you bind a component's class property to an element in its template?
{{ }}
[ ]
( )
[( )]
Q18
Q18 What is the purpose of the @Component decorator in Angular?
To define a service
To declare a class as an Angular component
To configure routing
To create a directive
Q19
Q19 Which Angular feature is used to display data in a component template dynamically?
Directives
Services
Modules
Pipes
Q20
Q20 How do you apply a CSS class conditionally to an element in Angular?
Using the [class] binding
Using the [style] binding
Using @Input
Using @Output
Q21
Q21 What does the following Angular template syntax do:
Displays a static message
Binds to a property called 'message' in the component
Creates a message variable
Links to an external message
Q22
Q22 Given the Angular syntax ,
what does (click) represent?
A directive
A data binding
An event binding
A property binding
Q23
Q23 In an Angular template, what is the purpose of the *ngIf directive?
To repeat a section of UI
To hide or show a section of UI conditionally
To create a reference to an element
To apply a CSS class
Q24
Q24 If an Angular component's template displays nothing where dynamic content should be, what might be the problem?
The component is not declared in a module
The data binding is incorrect
The directive is misspelled
The service is not connected
Q25
Q25 What could cause an error if a template variable is undefined in an Angular component's template?
Missing import in the component class
Incorrect syntax in the template
The variable is not declared in the class
The module is not imported
Q26
Q26 When encountering the error "Can't bind to 'ngModel' since it isn't a known property of 'input'",
what is the likely cause?
The FormsModule is not imported
The BrowserModule is not imported
The component is not declared in the NgModule
The Angular version is outdated
Q27
Q27 Which directive is used for two-way data binding in Angular forms?
ngModel
ngBind
ngControl
ngForm
Q28
Q28 What is the difference between structural and attribute directives in Angular?
Structural directives alter layout, attribute directives alter appearance
Structural directives alter behavior, attribute directives alter layout
Structural directives add or remove elements, attribute directives change the appearance of elements
Structural directives are built-in, attribute directives are custom
Q29
Q29 In Angular, what is the primary purpose of the [ ] syntax in templates?
To define a variable
To bind a property
To execute a function
To declare an array
Q30
Q30 How do you use a pipe in Angular?
{{ value | pipeName }}
[value | pipeName]
{{ value } & pipeName}
{{ value: pipeName }}