You are on page 1of 4

Q 1.

You could think of an observable as:


A. An event raised from a nested component
B. An array whose items arrive asynchronously over time
C. A service injected into any class that needs it

Q 2. A
class wants to use a service. Where do you define the
dependency for the injected service?
A. In the class signature
B. In the class constructor
C. In the component decorator
D. In the Import statement
Q 3. Interfaces are a feature of:
A. ES 2015
B. ES 5
C. Angular
D. TypeScript
Q 4. Whichof the following is correct syntax for
the ngFordirective?
A. *ngFor='let product in products'
B. *ngFor='let product of products'
C. *ngFor=let product in products
D. ngFor=let product of products

Q 5. A route is configured by specifying:

A. Path URL segment and reference to a component


B. Path URL segment and string component name
C. Path to the view and reference to a component
How are required parameters identified in the route
Q 6.
configuration?
A. In a params property
B. In a parameters property
C. As part of the path property
D. As part of the component property

Q 7. The following syntax is:


<button (click)='toggleImage()'/>
A. Property binding of the click property to the toggleImage property
B. Property binding of the click property to the toggleImage method
C. Event binding of the click event to the toggleImage method
D. Event binding of the click event to the toggleImage property

Q 8. Which process allows an application written in TypeScript


to run in the browser?
A. bundling
B. transpilation
C. minifying
D. linting

Q 9. Dependency Injection in Angular is closely tied to which


technology?
A. Webpack
B. Change Detection
C. Routing
D. TypeScript

Q 10. What do directives do?


A. Provide different views based on the URL
B. Format display of data
C. Group visual display with functionality
D. Add new capabilities to HTML elements

What HTTP verb is used when retrieving data from a


Q 11.
REST service?
A. PUT
B. PATCH
C. POST
D. DELETE
E. GET
Q 12. What
built-in Angular class is used to attach headers to an
HTTP request?
A. StatusCode
B. Header
C. ContentType
D. Observable
E. HttpHeaders
Q 13. What Angular class is used to make HTTP requests?
A. HttpClient
B. Interceptor
C. HttpSender
D. GetReq
E. ClientRequest
Q 14. What type do most methods on HttpClient return?
A. POST
B. Observable
C. Interceptor
D. RESTRequest
E. CacheObject
Q 15.Where should you provide a service that will be used
throughout an application?
A. In a child component
B. In the Webpack configuration
C. In an NgModule
D. In the base service
E. In the tsconfig file

Q 16.What type is returned from a GET request made with the


built-in HTTP client?
A. Function
B. Promise
C. Observable
D. Module
E. Callback
ANS : C

Q 17.What is the name of the Angular CLI command used to


create a new service?
A. ng serve
B. npm service
C. ng generate
D. npm start
E. ng new
Q 18.What is the name of the decorator conventionally added to
all Angular services?
A. Injectable
B. NgModule
C. Service
D. Component
E. Core
Q 19. Which of the following best describe an Angular service?
A. Collection of methods that don't fit anywhere else
B. Coordinator of routing
C. Encapsulated data presented in UI
D. Discrete piece of reusable functionality
E. Orchestrator of view logic
When serving Angular with ng serve using the Angular
Q 20.
CLI, where are the built/compiled files stored?
A. The Angular CLI cannot serve files.
B. In the /out folder
C. In the /dist folder
D. In memory

You might also like