0% found this document useful (0 votes)
289 views

Angular Routes and Forms MCQ

The document provides information about Angular routes and forms. It includes 0.6 credits and 150 miles. Multiple choice questions and answers are provided testing knowledge of Angular concepts including components, services, dependency injection, routing, observables, forms, and HTTP requests.

Uploaded by

swati sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
289 views

Angular Routes and Forms MCQ

The document provides information about Angular routes and forms. It includes 0.6 credits and 150 miles. Multiple choice questions and answers are provided testing knowledge of Angular concepts including components, services, dependency injection, routing, observables, forms, and HTTP requests.

Uploaded by

swati sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Angular - Routes and Forms

-0.6 Credits -150 Miles

MCQ Solutions:

1) Which of the following creates new services required by the


applications?
Choose the correct option from below list
(1) Providers
(2) dependancy injection
(3) Component
(4) Injectable

Answer:-(1)Providers

2) Which of the following provides data to components?


Pipes
Services
Decorators
Attributes

Answer:-(3)Services

3) You define Service in __________.

Constructor
Component
Decorator
Class

Answer:-(1)Constructor
4) In an HTTP call, from where is the data fetched?

@Input
Component
API
Service
Answer:-(4)API

5) An observable can handle multiple events.


False
True
Answer:-(1)True

6) Promise returns single value when called.


False
True

Answer: True
7) Which of the following is affected/changed on loading
components?
Attribute Directive
Observable
URL
Structural Directive
Answer:-(1)URL

8) The following are router guard types, except _________.


Choose the correct option from below list
CanDeactivateChild
CanActivateChild
CanActivate
CanDeactivate

Answer:-(1)CanDeactivateChild
9) Router defines mapping of URL to ______________.
Choose the correct option from below list
(1)Component
(2)Directive
(3)Pipes
(4)HTML page

Answer:-(1)Component

10) In Reactive forms, the HTML of the forms is automatically


created.
Choose the correct option from below list
(1)False
(2)True

Answer:-(1)False
11) You can prevent Angular2 from auto-validating the form by
using _______.
Choose the correct option from below list
(1)novalidate
(2)validate=”manual”
(3)validate=”disabled”
(4)form.novalidate

Answer:-(1)novalidate

12) FormGroups can nest inside other FormGroups.


Choose the correct option from below list
(1)True
(2)False

Answer:-(1)True
13) Which of the following creates new services required by the applications?
Choose the correct option from below list
(1)Providers
(2)dependancy injection
(3)Component
(4)Injectable

Answer:-(1)Providers

14) The PATCH method is used when sending passwords or other sensitive
information.
Choose the correct option from below list
(1)True
(2)False

Answer:-(1)True

15) @Service decorator is used to create a new service.


Choose the correct option from below list
(1)True
(2)False

Answer:-(2)False

16) In Reactive forms, the HTML of the forms is automatically created.


Choose the correct option from below list
(1)False
(2)True

Answer:-(1)False

17) Which decorator is optional if the class has any other decorator?
Choose the correct option from below list
(1)@injectable
(2)@Input
(3)@component
(4)@output
Answer:-(1)@injectable

18) In an HTTP call, from where is the data fetched?


Choose the correct option from below list
(1)Service
(2)Component
(3)@Input
(4)API

Answer:-(4)API

19) Non-parameterized routes always take priority over parameterized


routes.
Choose the correct option from below list
(1)True
(2)False

Answer:-(1)True
20) Which property of Routes defines the path of the component?
Choose the correct option from below list
(1)url
(2)href
(3)src
(4)path

Answer:-(4)path
21) You add novalidate attribute to a form to prevent the browser from
automatically validating.
Choose the correct option from below list
(1)True
(2)False

Answer:-(1)True
22) _____________ is not a primary HTTP verb.
Choose the correct option from below list
(1)PATCH
(2)GET
(3)POST
(4)FETCH

Answer:-(4)FETCH

23) Which function bootstraps the form to its pristine state?


Choose the correct option from below list
(1)bootstrap
(2)next
(3)reset
(4)ngSubmit

Answer:-(3)reset

24) Which of the following will be true if the user changed the value of
control?
Choose the correct option from below list
(1)dirty
(2)valid
(3)touched
(4)Pristine

Answer:-(1)dirty
25) Which property describes the path you want to redirect the user?
href
None of the options
redirectTo
src

Answer: redirectTo
26) An observable can handle multiple events.
Choose the correct option from below list
(1)True
(2)False

Answer:-(1)True
27) The following are router guard types, except _________.
Choose the correct option from below list
(1)CanDeactivateChild
(2)CanActivateChild
(3)CanActivate
(4)CanDeactivate

Answer:-(1)CanDeactivateChild

28) _____________ acts as a container to store all the services required for
creating a component.
Choose the correct option from below list
(1)providers
(2)imports
(3)registerable
(4)injectables

Answer:-(1)providers
29) You place _______________ where you want the components to be
inserted.
Choose the correct option from below list
(1)None of the options
(2)router-inlet
(3)router-insert
(4)router-outlet

Answer:-(4)router-outlet

30) _____________ decorator creates services.


Choose the correct option from below list
(1)@injectable
(2)@decorator
(3)@output
(4)@services

Answer:-(1)@injectables

31) Router defines mapping of URL to ______________.


Choose the correct option from below list
(1)Component
(2)Directive
(3)Pipes
(4)HTML

Answer:-(1)Component

32) The following are operators of observables, except ________.


Choose the correct option from below list
(1)geo
(2)map
(3)filter
(4)reduce

Answer:-(1)geo

You might also like