NEW
Font size
Worksheets1Rivet's Angular Community Quiz | Dynamic Components, Code Generators, ES-6 Features, Unit Test Cases
Total questions: 45
Worksheet time: 45mins
WeakSet objects are collections of ________
Objects
Arbitary Values
The value NaN cannot be found with indexOf in an array.
True
False
Clear() method is Obsolete for one of the following
Map
Set
Weakmap& Weakset
All of the above
WeakMaps prevents garbage collection.
True
False
You can get the size of a Map easily with the ____________
Size Property
Length Property
getSize()
getLength()
Key equality of Map and Set is based on the _______________algorithm.
sameValueZero
sameValue
Abstarct Equality Comparision
Strict Equality Comparision
Objects are enumerable in weakSet.
True
False
You can not create an Array from a Set using Array.from or the spread operator
True
False
NaN can be used as a key of Map.
True
False
NaN and undefined can be stored in a Set
True
False
I am not bounded with block scopes; I have no predefined type and could be reinitialized any time with any value. Who am I?
var
let
const
I am bounded with the scope; my value could be updated any time, but I can’t be redeclared. Who am I?
var
let
const
I am bonded with the scope; I should have value at the time of declarations, and which could not be updated lately.
var
let
const
Which of the following is the correct syntax for the Arrow function?
let fn = (x, y) => x*y
let fn = function (x, y){ return x*y}
let fn = (x*y)
Which of the following is the correct syntax for the Rest parameter?
function testMyRest (…a, b, c) {}
let fn = (a, …b, c) {return a}
let fn = (a, b, …c) => c.filter (x => x ===a || x===b)
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))
Hi, I am John from New York
Hi, I am undefined from undefined
Hi, I am John from undefine
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 });
{ id: 123, name: "Key board", purchasedDate: "25-12-2018" }
{ id: “P-123”, name: "Key board", purchasedDate: "25-12-2018" }
{ id: undefined, name: undefined, purchasedDate: undefined }
{ id: 123, id: “P-123”, name: "Key board", purchasedDate: "25-12-2018"
How to generate application with policy server?
--isPolicyServer
--policyServer
policyServer='true'
--hasPolicyServer
Can we use prelogin and postlogin app in same workspace?
True
False
It is neccessary to build common-libs in pre-loging application?
Yes
No
Name of property which is used for apply filter in table column?
isFilterable="true"
filterable="true"
hasFilterable="true"
allowFilter="true"
___________ input type not support in form generator?
dropdown
textarea
password
autocomplete
You can directly provide path of the other components xml files inside the leaf which you want to render inside the accordion?
True
False
Inside <tab> you can provide multiple <tabset> tags?
False
True
_____________ is responsible for containing model file?
Server
Client
Shared
None of the above
Which of the following generator is not supported in post-login application?
Tree View Generator
MVP Generator
Tabs Generator
Data Table Generator
Which of the following is used for generating E-servicing app?
hasEservicing
Eservicing
E-servicing
None of the above
Where are dynamic components registered?
entryComponents:[ ] and bootstrap:[ ]
imports:[ ] and entryComponents:[ ]
providers:[ ] and entryComponents:[ ]
declarations:[] and entryComponents:[]
Can we use dynamic component without registering it in declarations array ?
Yes
No
this.factoryResolver.resolveComponentFactory(pass any);
What will be the return type of above code?
ComponentReference<any>
ComponentInstance<any>
ComponentFactory<any>
ComponentRef<any>
this.container.createComponent(resolver);
What will be the return type of above code?
ComponentReference<any>
ComponentInstance<any>
ComponentFactory<any>
ComponentRef<any>
How to get data from dynamic component?
using @Input()
using @Output()
Can we create overlay without passing overlayConfiguration ?
Yes
No
How many parameters ComponentPortal expects?
1
2
3
4
Return type of Overlay.create() ?
ComponentFactory
ComponentRef
PortalRef
OverlayRef
Dynamic Components load at ?
Run Time
Compile TIme
Which of the following can be used to run unit tests in Angular?
Karma
Protractor
Which of the following can be used to run end-to-end tests in Angular?
Karma
Protractor
Test doubles are needed when writing which of the following?
Unit Tests
End to End Tests
Both of the above
Which of the following will need Angular testing utilities for unit testing?
Services
Components
Both of the above
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?
AngularTestUtil
NgTest
NgTestBed
TestBed
It is recommended to write isolated unit tests for which of the following?
Services
Pipes
Both of the above
None of the above
Karma test runner requires tests to be written with file having extension such as which of the following?
.test.ts
.spec.ts
It is OK to re-configure TestBed after calling createComponent API on TestBed.
True
False
Which of the following TestBed method is used to create an Angular component under test?
createComponent
createTestingComponent
configureComponent
configureTestingComponent
