wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

1Rivet's Angular Community Quiz | Dynamic Components, Code Generators, ES-6 Features, Unit Test Cases

Total questions: 45

Worksheet time: 45mins

Name
Class
Date
1.

WeakSet objects are collections of ________

a)

Objects

b)

Arbitary Values

2.

The value NaN cannot be found with indexOf in an array.

a)

True

b)

False

3.

Clear() method is Obsolete for one of the following

a)

Map

b)

Set

c)

Weakmap& Weakset

d)

All of the above

4.

WeakMaps prevents garbage collection.

a)

True

b)

False

5.

You can get the size of a Map easily with the ____________

a)

Size Property

b)

Length Property

c)

getSize()

d)

getLength()

6.

Key equality of Map and Set is based on the _______________algorithm.

a)

sameValueZero

b)

sameValue

c)

Abstarct Equality Comparision

d)

Strict Equality Comparision

7.

Objects are enumerable in weakSet.

a)

True

b)

False

8.

You can not create an Array from a Set using Array.from or the spread operator

a)

True

b)

False

9.

NaN can be used as a key of Map.

a)

True

b)

False

10.

NaN and undefined can be stored in a Set

a)

True

b)

False

11.

I am not bounded with block scopes; I have no predefined type and could be reinitialized any time with any value. Who am I?

a)

var

b)

let

c)

const

12.

I am bounded with the scope; my value could be updated any time, but I can’t be redeclared. Who am I?

a)

var

b)

let

c)

const

13.

I am bonded with the scope; I should have value at the time of declarations, and which could not be updated lately.

a)

var

b)

let

c)

const

14.

Which of the following is the correct syntax for the Arrow function?

a)

let fn = (x, y) => x*y

b)

let fn = function (x, y){ return x*y}

c)

let fn = (x*y)

15.

Which of the following is the correct syntax for the Rest parameter?

a)

function testMyRest (…a, b, c) {}

b)

let fn = (a, …b, c) {return a}

c)

let fn = (a, b, …c) => c.filter (x => x ===a || x===b)

16.

Predict the output of the following

const d = { name: "John", age: 25, city: "New York" }; let fn = ({ name, state }) =>

`Hi, I am ${name} from ${state}`

console.log(fn(d))

a)

Hi, I am John from New York

b)

Hi, I am undefined from undefined

c)

Hi, I am John from undefine

17.

Predict the output of the following

const product = { id: 123, name: "Key board" };

const purchaseDetail = { id: “P-123”, purchasedDate: "25-12-2018"};

console.log({ ...product, ...purchaseDetail });

a)

{ id: 123, name: "Key board", purchasedDate: "25-12-2018" }

b)

{ id: “P-123”, name: "Key board", purchasedDate: "25-12-2018" }

c)

{ id: undefined, name: undefined, purchasedDate: undefined }

d)

{ id: 123, id: “P-123”, name: "Key board", purchasedDate: "25-12-2018"

18.

How to generate application with policy server?

a)

--isPolicyServer

b)

--policyServer

c)

policyServer='true'

d)

--hasPolicyServer

19.

Can we use prelogin and postlogin app in same workspace?

a)

True

b)

False

20.

It is neccessary to build common-libs in pre-loging application?

a)

Yes

b)

No

21.

Name of property which is used for apply filter in table column?

a)

isFilterable="true"

b)

filterable="true"

c)

hasFilterable="true"

d)

allowFilter="true"

22.

___________ input type not support in form generator?

a)

dropdown

b)

textarea

c)

password

d)

autocomplete

23.

You can directly provide path of the other components xml files inside the leaf which you want to render inside the accordion?

a)

True

b)

False

24.

Inside <tab> you can provide multiple <tabset> tags?

a)

False

b)

True

25.

_____________ is responsible for containing model file?

a)

Server

b)

Client

c)

Shared

d)

None of the above

26.

Which of the following generator is not supported in post-login application?

a)

Tree View Generator

b)

MVP Generator

c)

Tabs Generator

d)

Data Table Generator

27.

Which of the following is used for generating E-servicing app?

a)

hasEservicing

b)

Eservicing

c)

E-servicing

d)

None of the above

28.

Where are dynamic components registered?

a)

entryComponents:[ ] and bootstrap:[ ]

b)

imports:[ ] and entryComponents:[ ]

c)

providers:[ ] and entryComponents:[ ]

d)

declarations:[] and entryComponents:[]

29.

Can we use dynamic component without registering it in declarations array ?

a)

Yes

b)

No

30.

this.factoryResolver.resolveComponentFactory(pass any);


What will be the return type of above code?

a)

ComponentReference<any>

b)

ComponentInstance<any>

c)

ComponentFactory<any>

d)

ComponentRef<any>

31.

this.container.createComponent(resolver);


What will be the return type of above code?

a)

ComponentReference<any>

b)

ComponentInstance<any>

c)

ComponentFactory<any>

d)

ComponentRef<any>

32.

How to get data from dynamic component?

a)

using @Input()

b)

using @Output()

33.

Can we create overlay without passing overlayConfiguration ?

a)

Yes

b)

No

34.

How many parameters ComponentPortal expects?

a)

1

b)

2

c)

3

d)

4

35.

Return type of Overlay.create() ?

a)

ComponentFactory

b)

ComponentRef

c)

PortalRef

d)

OverlayRef

36.

Dynamic Components load at ?

a)

Run Time

b)

Compile TIme

37.

Which of the following can be used to run unit tests in Angular?

a)

Karma

b)

Protractor

38.

Which of the following can be used to run end-to-end tests in Angular?

a)

Karma

b)

Protractor

39.

Test doubles are needed when writing which of the following?

a)

Unit Tests

b)

End to End Tests

c)

Both of the above

40.

Which of the following will need Angular testing utilities for unit testing?

a)

Services

b)

Components

c)

Both of the above

41.

Which of the following utility is used to create an Angular testing module which can be used to create module environment for the class one wants to test?

a)

AngularTestUtil

b)

NgTest

c)

NgTestBed

d)

TestBed

42.

It is recommended to write isolated unit tests for which of the following?

a)

Services

b)

Pipes

c)

Both of the above

d)

None of the above

43.

Karma test runner requires tests to be written with file having extension such as which of the following?

a)

.test.ts

b)

.spec.ts

44.

It is OK to re-configure TestBed after calling createComponent API on TestBed.

a)

True

b)

False

45.

Which of the following TestBed method is used to create an Angular component under test?

a)

createComponent

b)

createTestingComponent

c)

configureComponent

d)

configureTestingComponent