Loading...
QUIZ

Certification Test

 
Que No. 1 ) How do you define a service in Angular?

A.) Using the "@Component" decorator
B.) Using the "@Service" decorator
C.) Using the "@Injectable" decorator
D.) Using the "@Module" decorator


Que No. 2 ) What is an Angular directive?

A.) A component that handles user input
B.) A class that defines routes
C.) A custom HTML attribute used to manipulate the DOM
D.) A module that handles HTTP requests


Que No. 3 ) How do you create a custom directive in Angular?

A.) By using the "@Directive" decorator
B.) By defining a new component
C.) By using the "@Component" decorator
D.) By creating a new module


Que No. 4 ) How do you create a custom directive in Angular?

A.) By using the "@Directive" decorator
B.) By defining a new component
C.) By using the "@Component" decorator
D.) By creating a new module


Que No. 5 ) What is Angular's built-in way to handle forms and form validation?

A.) FormsModule
B.) FormService
C.) NgForm
D.) FormBuilder


Que No. 6 ) What is the purpose of Angular's "ngClass" directive?

A.) To bind a class to an HTML element
B.) To create a new class
C.) To remove a class from an HTML element
D.) To define CSS styles


Que No. 7 ) How do you handle errors in Angular's HTTP requests using the "catchError" operator?

A.) By throwing an exception
B.) By returning an observable with an error message
C.) By using the "try...catch" statement
D.) By using the "error" attribute in the template


Que No. 8 ) What is the purpose of Angular's "ngFor" directive?

A.) To create a for loop
B.) To iterate over the properties of an object
C.) To iterate over the elements of an array
D.) To define CSS styles


Que No. 9 ) What is the purpose of Angular's "ngStyle" directive?

A.) To define CSS classes
B.) To apply inline styles to an HTML element
C.) To create animations
D.) To handle user events


Que No. 10 ) Which decorator is used to inject a service into a component in Angular?

A.) @Inject
B.) @Service
C.) @Injectable
D.) @Component