Google News
logo
Angular - Quiz(MCQ)

Angular is an application-design framework and development platform for creating efficient and sophisticated single-page apps.

These Angular docs help you learn and use the Angular framework and development platform, from your first application to optimizing complex single-page applications for enterprises. Tutorials and guides include downloadable examples to help you start your projects.

A)
Angular is based on TypeScript.
B)
This is a superset of JavaScript.
C)
TypeScript is maintained by Microsoft.
D)
All of the above.

Correct Answer :   All of the above.

A)
Streams data in asynchronously
B)
Streams data in synchronously
C)
Both
D)
None of above

Correct Answer :   Both

A)
Ahead-Of-Time Compilation
B)
Angular Object Templates
C)
Both
D)
None of above

Correct Answer :   Ahead-Of-Time Compilation

A)
ngOnChanges
B)
ngViewStart
C)
ngOnInit
D)
None of the above

Correct Answer :   ngViewStart

A)
@angular/core
B)
@angular/router
C)
Both
D)
None of the above

Correct Answer :   @angular/router

A)
Browser
B)
Server Side
C)
Both
D)
None of the above

Correct Answer :   Both

A)
pipeName
B)
pipeDeco
C)
Pipe
D)
None of the above

Correct Answer :   Pipe

A)
@NgModule
B)
@NgApp
C)
Both
D)
None of the above

Correct Answer :   @NgModule

A)
Used to link external files
B)
Used to configure your angular 2 project
C)
used to install required project packages
D)
None of the above

Correct Answer :   Used to configure your angular 2 project

A)
main.ts
B)
index.js
C)
app.ts
D)
angular.cli.json

Correct Answer :   main.ts

A)
Property-value | filter
B)
Property-value || filter
C)
Property-value && filter
D)
None of the above

Correct Answer :   Property-value | filter

A)
{{}}
B)
{{{}}}
C)
{{|var}}
D)
!!!!

Correct Answer :   {{}}

A)
upper
B)
uppercase
C)
toUpper
D)
None of the above

Correct Answer :   uppercase  (  {{value| uppercase}}  )

A)
ngOnInit
B)
ngOnChanges
C)
ngAfterViewInit
D)
ngViewStart

Correct Answer :   ngViewStart


Explanation : ngViewStart is not a hook in Angular 2 application life cycle.

A)
DynamicComponentLoader
B)
DynamicControlLoader
C)
DynamicControllerLoader
D)
None of the above

Correct Answer :   DynamicComponentLoader

A)
Scope.js
B)
zone$.js
C)
zone.js
D)
zones.js

Correct Answer :   zone.js

A)
Need to maintain AOT version of bootstrap file
B)
Works only with HTML and CSS
C)
Detect error at build time
D)
None of the above

Correct Answer :   Detect error at build time

A)
Components
B)
Multithread
C)
TypeScript
D)
Services

Correct Answer :   Multithread

A)
Npm
B)
Editor
C)
GIT
D)
All of the above

Correct Answer :   All of the above

A)
This file contains information about Angular 2 project.
B)
This file contains the system files required for Angular JS application.
C)
This file is used to give the options about TypeScript used for the Angular JS project.
D)
All of the above

Correct Answer :   This file is used to give the options about TypeScript used for the Angular JS project.

A)
By enabling TypeScript's StrictNullChecks
B)
By creating flattened versions of Angular modules
C)
By generating source maps in terms of original template
D)
None of the above

Correct Answer :   By creating flattened versions of Angular modules

A)
synchronous
B)
asynchronous
C)
Both  ( synchronous & asynchronous )
D)
None of the above

Correct Answer :   asynchronous

A)
In the Component
B)
In the Template
C)
In the Injectable decorator
D)
In the module

Correct Answer :   In the Injectable decorator

A)
Loop through and print the index
B)
Loop through and print the employees
C)
Pass both the index and the employee to a web service
D)
Loop through and print the index and the employee

Correct Answer :   Loop through and print the index and the employee

A)
in parallel
B)
LIFO order
C)
in the order in which you specify them
D)
None of the above

Correct Answer :   in the order in which you specify them

A)
user's format setting
B)
user's locale setting
C)
user's currency setting
D)
All of the above

Correct Answer :   user's locale setting

A)
Create a URL transaction
B)
Use the HTTP get method
C)
Create a get SQL statement
D)
Use an HTTP package

Correct Answer :   Create a URL transaction

A)
DatePipe
B)
CurrencyPipe
C)
DataPipe
D)
PercentPipe

Correct Answer :   DataPipe

A)
You cannot place breakpoints on asynchronous operators
B)
Place a breakpoint on the function that calls the http.get
C)
Place a breakpoint on the http.get
D)
Place a breakpoint inside one of the functions inside the pipe call

Correct Answer :   Place a breakpoint inside one of the functions inside the pipe call

A)
It navigates to the component with a name matching the assigned string
B)
It links a route to a service by matching the assigned string to a service class name
C)
It links a route with data by matching the assigned string to a property name
D)
It navigates to the component with a path matching the assigned string

Correct Answer :   It navigates to the component with a path matching the assigned string

A)
@Component({
  templateUrl: './orders.component.html'
})
B)
@Component({
  template: './orders.component.html'
})
C)
@Component({
  templateUrl: './orders/orders.component.html'
})
D)
@Component({
template: `
 ./orders/orders.component.html`
})

Correct Answer :  

@Component({
   templateUrl: './orders.component.html'
})

A)
libraries used by the application including Angular system and third-party libraries.
B)
objects available for dependency injection.
C)
components that the application provides to other parts of the application.
D)
components, custom directives, and custom pipes.

Correct Answer :   objects available for dependency injection.

A)
ng new my-dream-app --routing
B)
ng new my-dream-app --module
C)
ng generate my-dream-app --routing
D)
ng generate my-dream-app

Correct Answer :   ng new my-dream-app --routing

A)
All matching elements in the application
B)
All matching elements in the component and its child components
C)
All matching elements in the module
D)
All matching elements in the component, only

Correct Answer :   All matching elements in the component, only

A)
Using the modify operator chained to the http.get
B)
Using the map function inside of the pipe operator chained to the http.get
C)
Using the transform operator chained to the http.get
D)
Subscribing to the http.get and setting the response to a local variable

Correct Answer :   Using the map function inside of the pipe operator chained to the http.get

A)
In the component metadata
B)
In a service
C)
In the template
D)
In the component class

Correct Answer :   In the template

A)
A directive defined in the HTML identifying the route to activate
B)
A directive defined in the HTML indicating where a route's view should display
C)
A decorator defining the template to display when a route is activated
D)
A property of a component class used to activate a route

Correct Answer :   A directive defined in the HTML indicating where a route's view should display

A)
Event handlers
B)
Complex logic
C)
DOM manipulation
D)
Debugging logic

Correct Answer :   Complex logic

A)
Precompiles when the code is served, instead of in the browser
B)
Precompiles at build time, instead of in the browser
C)
Tree shakes all unused code when the app is served
D)
Compiles in the browser

Correct Answer :   Precompiles at build time, instead of in the browser

A)
ng generate component customerdetail
B)
ng create component customer-detail
C)
ng c c customer-detail
D)
ng generate component customer-detail

Correct Answer :   ng generate component customer-detail

A)
Generates the form elements from data properties in the component class
B)
Creates the form data structure from a specified configuration when building reactive forms
C)
Creates the form data structure from a specified configuration when building template-driven forms
D)
Creates the form data structure from a specified configuration when building template-driven forms

Correct Answer :   Creates the form data structure from a specified configuration when building reactive forms

A)
--spec false
B)
--testing false
C)
--unit-test false
D)
--test false

Correct Answer :   --spec false

A)
@Input('userData') users
B)
@Input() userData: users
C)
@Input() users: userData
D)
@Input('users') userData

Correct Answer :   @Input('userData') users

A)
As part of the FormControl configuration: heroName: ['', Validators.required]
B)
As part of the FormControl configuration: heroName: [Validators.required, '']
C)
As standard HTML validation attributes added to the input element
D)
As part of the input element binding: formControl="[heroName, Validators.required]"

Correct Answer :   As part of the FormControl configuration: heroName: ['', Validators.required]