Angular 2 MCQ

Angular 2 MCQ | Freshers & Experienced

  • Sharad Jaiswal
  • 27th May, 2021

We are introducing here the best Angular 2 MCQ Questions, which are very popular & cover the latest and important topics of Angular 2. This Angular 2 MCQ Test contains Top 35 Angular 2 Multiple Choice Questions and Answers, so practice these questions to check your final preparation for Angular Exams, Interviews & Placement Drives. When you choose an option for these questions, the green color belongs to the right option & the red color belongs to the wrong option.

Angular 2 MCQ Questions

1) Angular 2 integrates easily with NativeScript, allowing you to code your native app in a . . . . . . . . . style that can run on any mobile device platform.

  • A. interrogative
  • B.exclamatory
  • C.declarative
  • D.imperative

2) Since Angular 2 defines a set of built-in directives, the . . . . . . . . method passes them in a similar way in order to make them available in the entire application in order to prevent us from code duplications.

  • A. startup
  • B.constructor
  • C.bootstrap
  • D.initialization

3) What are the new features of Angular2?

  • A. Component-Based
  • B.Directives
  • C.Dependency Injection
  • D.All of these

4) Angular 2 is using . . . . . . . . to detect changes.

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

5) Angular 2 can detect when component data changes, and then automatically re-render the view to reflect that change.

  • A. False
  • B.True
  • C.Both
  • D.None

6) On the opposite side of event bindings (()) lie Angular's square-bracket syntax ([]) which signify a . . . . . .

  • A. property binding
  • B.class binding
  • C.style binding
  • D.Both A & B

7) Angular 2 is entirely component based. Controllers and $scope are no longer used. They have been replaced by . . . . . . . and . . . . . . . .

  • A. components, directives
  • B.controllers, directives
  • C.$scopes, components
  • D.components, controllers

8) Angular 2 components can be described using . . . . . . A . . . . . . is a way to do some meta-programming.

  • A. typescripts, typescript
  • B.decorators, decorator
  • C.loaders, loader
  • D.controllers, controller

9) Angular 1 core concept was $scope, and you will not find $scope in angular 2.0. Angular 2 is using . . . . . . . . to detect changes.

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

10) Interpolation in angular 2 is done using

  • A. {{}}
  • B.{{{}}}
  • C.!!!!
  • D.{{|var}}

11) Which character is used for chaining multiple pipes in Angular

  • A. -
  • B.:
  • C.\
  • D.|

12) Which of the following is not a hook in Angular 2 application life cycle.

  • A. ngAfterViewInit
  • B.ngViewStart
  • C.ngOnInit
  • D.ngOnChanges

13) Which of the following is the correct way to apply a filter?

  • A. - Property-value && filter
  • B.- Property-value | filter
  • C.Property-value & filter
  • D.- Property-value || filter

14) Select the syntax for two-way data binding in angular.

  • A. None of these
  • B.[target]="expression"
  • C.(target)="statement"
  • D.[(target)]="expression"

15) Indentify the syntax of data binding in angular of one-way - form view target of data source.

  • A. [(target)]="expression"
  • B.on-target="statement"
  • C.[target]="expression"
  • D.None of these

16) identify the results, if value of start parameter, is negative and greater than the size of the list or string expression, in slicepipe of angular.

  • A. return an empty list of string
  • B.returns a part of list or string
  • C.depends upon the text
  • D.return entire list or string

17) What is the language of the angular template.

  • A. html
  • B.java
  • C.css
  • D.javascript

18) Highlight the syntax for two-way data binding in angular.

  • A. bind-target="expression"
  • B.None of these
  • C.bindon-target="expression"
  • D.on-target="statement"

19) What is not involved in writing a angular structural directive

  • A. Import the input, templateref, and viewcontainerref sysmbols
  • B.Import the directive decorator.
  • C.Apply the decorator to the directive class.
  • D.All of these

20) Select the correct syntax, for adding an ngclass property binding to currentclasses in angular.

  • A. <div [ngclass]="currentclasses">this div is initially saveable, unchanged, and special</div>
  • B.<div (ngclass)="currentclasses">this div is initially saveable, unchanged, and special</div>
  • C.<div [currentclasses]="ngclasses"> this div is initially saveable, unchanged, and special</div>
  • D.<div (currentclasses)="ngclasses"> this div is initially saveable, unchanged, and special</div>

21) Select the correct syntax for angular template which binds property value to the results of expression first name.

  • A. <input {value}="firstname">
  • B.<input [{value}]="firstname">
  • C.<input (value)="firstname">
  • D.<input [value]="firstname">

22) Select the correct syntax for angular template which binds style property width to the results of expression mysize in pixels. units are optional.

  • A. <div (style.width.px)="mysize">
  • B.<div {style.width.px}="mysize">
  • C.<div {[style.width.px]}="mysize">
  • D.<div [style.width.px]="mysize">

23) Which of the following is not an built-in pipe in angular

  • A. sentencecasepipe
  • B.datapipe
  • C.uppercasepipe
  • D.lowercasepipe

24) whice operator is not supported by template expression in angular.

  • A. ++
  • B.&
  • C.=
  • D.+=

25) Angular 2 make use of the . . . . . . . module syntax.

  • A. ES2016
  • B.ES2015
  • C.ES2016a
  • D.ES2017

26) In Angular 2, applications rely upon the . . . . . . . method to load top-level components

  • A. loadstrap
  • B.bootstrap
  • C.bootload
  • D.none of above

27) Angular 2 has a . . . . . . . service that allows us to dynamically load a component in a certain position on the page.

  • A. DynamicComponentLoader
  • B.DynaCompLoader
  • C.DynamicControllerLoader
  • D.DynamicControlLoader

28) If you chain multiple pipes together, they are executed

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

29) What is the decorator used for configuring your module class?

  • A. @NgApp
  • B.@NgAngular
  • C.@NgModule
  • D.@NgConfigure

30) Which of the following is the advantage of Aot compilation?

  • A. Detect error at build time
  • B.Works only with HTML and CSS
  • C.Needs cleanup step before compiling
  • D.Need to maintain AOT version of bootstrap file

31) Which file is responsible for startup of angular 2 project?

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

32) What does AOT stand for

  • A. Angular Open Terminal
  • B.ahead-of-time compilation
  • C.Angular Object Templates
  • D.None of the above

33) Which of the following is not the feature of Angular 2?

  • A. Services
  • B.TypeScript
  • C.Multithread
  • D.Components

34) Angular 2 Metadata can be used to add more data to an Angular JS class.

  • A. True
  • B.False

35) Angular 2 still does not provide nested components.

  • A. True
  • B.False

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Mar
IoT MCQ
01st
Jul
MS Word MCQ