Please Select a Company.
Please Select a Company.
Angular MCQ Questions | Interview Quick

.

Angular MCQ

1. What method is used to wire up a FormControl to a native DOM input element in reactive forms?

2. What is the difference between the paramMap and the queryParamMap on the ActivatedRoute class?

3. What is the RouterModule.forRoot method used for?

4. What is the correct template syntax for using the built-in ngFor structural directive to render out a list of productNames?

5. What are the two component decorator metadata properties used to set up CSS styles for a component?

6. . What is the purpose of the valueChanges method on a FormControl?

8. . You want to see what files would be generated by creating a new contact-card component. Which command would you use?

9. . What are Angular lifecycle hooks?

10. . How would you configure a route definition for a UserDetailComponent that supports the URL path user/23 (where 23 represents the id of the requested user)?

11. In order for Angular to process components in an application, where do the component types need to be registered?

12. When a service is provided for root and is also added to the provider's configuration for a lazy-loaded module, what instance of that service does the injector provide to constructors in the lazy-loaded module?

13. In reactive forms, what Angular form class type is used on the native DOM element to wire it up?

14. How does the emulated view encapsulation mode handle CSS for a component?

15. When a service requires some setup to initialize its default state through a method, how can you make sure that said method is invoked before the service gets injected anywhere?

16. What is the primary difference between a component and a directive?

17. What lifecycle hook can be used on a component to monitor all changes to @Input values on that component?

18. Which Angular CLI command would you run to generate a UsersComponent and add it to the SharedModule (in file shared.module.ts in your application)?

19. What Angular utilities, if any, are required to unit test a service with no constructor dependencies?

20. What is the difference between the CanActivate and the CanLoad route guards?

Our Brands by Nishtya Infotech Private Limited:

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as