Sharag Web

Get All Information

Angular Interview Questions Quiz with Key Answers

Angular Quiz :

1) Which command enables a number of optimizations that drastically reduces the size of the project?
A. ng build
B. ng build –optimize
C. ng build –prod
D. ng build –bundle

2) What Is an Angular Service?

A. It is the root AppComponent that Angular creates and inserts into the “index.html” host web page.
B. It is a tool to initialize, develop, scaffold and maintain Angular applications.
C. It is a class that encapsulates some HTTP methods and provides it result as a service for across your application.
D. It is a type of injection and attackers inject your web applications using the client side scripts and malicious code into web pages.

3) Which structural directive used to repeat a given HTML template once for each value in an array, each time passing it the array value as context for string interpolation or binding?
A. ngIf
B. ngFor
C. ngSwitch
D. ngRepeat

4) The format for defining Property Binding in a template is
A.
B.
C.
D.

5) Which is a tool to initialize, develop, scaffold and maintain Angular applications?
A. Service Worker
B. Angular CLI
C. Angular Bootstrap
D. Angular App

6) What are the main building blocks of Components?
A. Template
B. Class
C. Metadata
D. All of the above

7) Which is enables navigation from one view to the next as users perform application tasks?
A. Navigator
B. Router
C. Direction-finder
D. Path-finder

8) Which allows us to easily achieve data binding in two directions: from the view to the model and from the model to the view.
A. {{ngModel}}
B. [ngMode]
C. ([ngModel])
D. [(ngModel)]

9) The first animation-specific function that we use is _________. This allows us to define the name of the animation in the first parameter, and then an array of other animation-specific functions in the next.
A. transition()
B. animatronics ()
C. trigger()
D. animation()

10) Which is an animation-specific function that is designed to be used inside of Angular’s animation DSL language. If this information is new, please navigate to the component animations metadata page to gain a better understanding of how animations in Angular are used?
A. state()
B. transition()
C. animatronics ()
D. trigger()

11) What is Bootstrap?
A. Use to declare the application components.
B. Every application must import BrowserModule to run the app in a browser.
C. There are none to start.
D. This is a root AppComponent that Angular creates and inserts into the index.html host web page.

12) Which is the correct format for defining interpolation in a template?
A.
B.
C.
D.

13) Which allows you to define properties in a component class, and communicate these properties to and from the template?
A. Interpolation
B. Class Binding
C. Event Binding
D. Two way binding

14) List the types of Binding in Angular from the list :
A. Interpolation
B. Property Binding
C. Two-Way Data Binding
D. Event Binding

A. A,B,C
B. B,C,D
C. A,C,D
D. A,B,C,D

15) In some situation we want data values as boolean or other than string then we should go for _________ binding
A. Interpolation
B. Property
C. Template
D. Both A and B

16) True or False: The styles specified in @Component metadata apply only within the template of that component.
A. TRUE
B. FALSE

17) True or False: Component templates are not always fixed. An application may need to load new components at runtime.
A. TRUE
B. FALSE

18) The Bootstrap is the _______ AppComponent that Angular creates and inserts into the “index.html” host web page.
A. child
B. additional
C. root
D. module

19) Which defines the Layout of the View and defines what is rendered on the page. Without this, there is nothing for Angular to render to the DOM?
A. Selector
B. Class
C. Template
D. Style

20) ___________ configure the injector and the compiler and help organize related things together.
A. @NgModule
B. @Component
C. @Directive
D. @Module

Answers :

1)  C. ng build –prod
2)  C. It is a class that encapsulates some HTTP methods and provides it result as a service for across your application.
3) B. ngFor
4) B. [value]=”username”
5) B. Angular CLI
6) D.  All of the above
7) B. Router
8)  D.  [(ngModel)]
9)  C. trigger()
10) B. transition()
11) D. This is a root AppComponent that Angular creates and inserts into the index.html host web page.
12)  D. value={{username}}
13)  A. Interpolation
14)  B. B,C,D
15)  B. Property
16)  A. TRUE
17)  A. TRUE
18)  C. root
19)  C. Template
20) A. @NgModule

Leave a Reply

Your email address will not be published. Required fields are marked *

You cannot copy content of this page