Angular Routes and Forms MCQ
Angular Routes and Forms MCQ
MCQ Solutions:
Answer:-(1)Providers
Answer:-(3)Services
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
Answer: True
7) Which of the following is affected/changed on loading
components?
Attribute Directive
Observable
URL
Structural Directive
Answer:-(1)URL
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
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
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
Answer:-(2)False
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
Answer:-(4)API
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
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
Answer:-(1)@injectables
Answer:-(1)Component
Answer:-(1)geo