0% found this document useful (0 votes)
12 views7 pages

Angular

Mca notes

Uploaded by

kushdev77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

Angular

Mca notes

Uploaded by

kushdev77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

A#Q1.

EventEmitter class�s simple interface, which basically


encompass two methods . . . . . . . . . can therefore be used to
trigger custom events and listen to events as well, both
synchronously or asynchronously.

A. arr[arr.length] = value
B. arr[arr.length+1] = new Arrays()
C. arr[arr.length-1] = value
D. arr[arr.length*1] = value
A#Q1ANS=C

A#Q2.@Output() myEvent = new EventEmitter();

A. Declares an output property that fires events that you


cannot subscribe to with an event binding.
B. Declares an output property that fires events that you can
subscribe to with an event binding.
C. Declares an output property that overrides events that you
can subscribe to with an event binding.
D. Declares an output property that subscribes events that you
can subscribe to with an event binding.

A#Q2ANS=B

A#Q3. Angular framework provides event binding using in-built event as well as
custom event.
Custom events are the EventEmitter instances. To create a custom event we need to
create an
instance of EventEmitter annotated by . . . . . . .

A. @Input()
B. @Get()
C. @Output()
D. @Set()

A#Q3ANS=C
A#Q4.Which of the following is true about $routeProvider?

A.$routeProvider is the key service which set the


configuration of urls.

B.$routeProvider maps Urls with the corresponding html


page or ng-template.

C.$routeProvider attaches a controller with the view.

D.All of the above.


A#Q4ANS=D

A#Q5.Which of the following is true about currency filter?

A.Currency filter formats text in a currency format.

B.Currency filter is a function which takes text as input.

C.Both of the above.

D.None of the above.


A#Q5ANS=B

A#Q6.Which function among the following lets to register a function to be invoked


once?
A.setTimeout()
B.setTotaltime()
C.setInterval()
D.none of the mentioned
A#Q6ANS=a

A#Q7.
Which is the handler method used to invoke when uncaught JavaScript exceptions
occur?
A.Onhalt
B.Onerror
C.Both onhalt and onerror
D.None of the mentioned
A#Q7ANS=B

A#Q8. What will happen if reverse() and join() methods are used simultaneously ?
A.Reverses and stores in the same array
B.Reverses and concatenates the elements of the array
C.Reverses
D.All of the mentioned

A#Q8ANS=a

A#Q9. What is the main difference between a walkthrough


and an inspection?

A. A walkthrough is lead by the author, whilst an inspection


is lead by a trained moderator.
B. An inspection has a trained leader, whilst a walkthrough
has noleader.
C. Authors are not present during inspections, whilst
they are during walkthroughs.
D. An inspection is lead by the author, whilst a walkthrough
is lead by a trained moderator.

A#Q9ANS= A

A#Q10.The basic difference between JavaScript and Java is


A.There is no difference
B.Functions are considered as fields
C.Variables are specific
D.Functions are values, and there is no hard distinction between methods and fields
A#Q10ANS= D

A#Q11.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. declarative
B.imperative
C. interrogative
D. exclamatory
A#Q11ANS=A

A#Q12.Angular 2 has a . . . . . . . service that allows us to dynamically


load a component in a certain position on the page.

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

A#Q12ANS=D

A#Q13. Angular 2.0 contains a logging service called . . . . . which is very


useful feature measuring where time is spent in your application.

A. config.js
B.logging.js
C. diary.js
D.none of above

A#Q13ANS=C

A#Q14.Consider the code snippet given below


var count = [1,,3];
What is the observation made?
A.

The omitted value takes �undefined�


B.

This results in an error


C.

This results in an exception


D.

None of the mentioned


A#Q14ANS=A

A#Q15. Angular initializes based upon which of the


following scenario?
A. DOMContentLoaded event happens
B. document.readyState is set to complete
C. Both of the above
D. None of the above
A#Q15ANS=C

A#Q16.How can we make methods available on all objects?


A.

Object.add(methods)
B.
Object.methods(add)
C.

Object.add.methods(�)
D.

Object.prototype
A#Q16ANS=D

A#Q17. What are various possible ways in which angular application can be
initialized?
A. On an element, one could either put simply the attribute such as (ng-app, data-
ng-app, ng:app, x-ng-app)
B. Put the named attribute such as (ng-app='demoApp')
C. Both of the above
A#Q17ANS=C

A#Q18. Which of the following selector matches all


elements of a type?
A. The Type Selector
B. The Universal Selector
C. The Descendant Selector
D. The Class Selector
A#Q18ANS=A

A#Q19 What are various possible prefixes such as 'ng-' using which Angular
directives (for example, ng-app) can be defined?
A. 'ng-', 'data-ng-', 'ng:'
B. 'ng-'
C. 'ng-', 'data-ng-', 'ng:', 'x-ng-'
D. 'ng-', 'data-ng-','x-ng-'

A#Q19ANS=c

A#Q20. Why does JavaScript subset disallow == and !=?


A.

It uses bitwise checking


B.

It uses === and !== instead


C.

It uses equals() and notequals() instead


D.

None of the mentioned


A#Q20ANS=B

A#Q21. In Angular 2 . . . . . . . . directive allows us to


iterate through a collection.
A. NgRepeat
B. NgWhile
C. NgIf
D. NgFor
A#Q21ANS=D
A#Q22.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. bootstrap
C. constructor
D. initialization
A#Q22ANS=B

A#Q23. Which of the following is not a directive in Angular 2?


A. advanced directives
B. attribute directives
C. structural directives
D. components
A#Q23ANS=A

A#Q24. A component is a class decorated with some metadata


and . . . . are functions that can modify a class.
A. Selectors
B. Decorators
C. Mentors
D. Bindings
A#Q24ANS=B

A#Q25. Components conduct a provider lookup upwards because


each component has its own built-in . . . . . . . , which
is specific to it.
A. service
B. instance
C. hook
D. injector
A#Q25ANS=D

A#Q26. What is the code to be used to trim whitespaces ?


A.

let trimmed = (l.trim() for (l in lines));


B.

let trimmed = (trim(l));


C.

let trimmed = l.trim();


D.

let trimmed = for(l in lines));


A#Q26ANS=A

A#Q27. If the data obtained from the model contains HTML elements,
these are escaped before being inserted into the HTML template.
The escaping means that the HTML is displayed as text, and not
as HTML. This is done to prevent . . . .
A. SQL injection attacks
B. JS injection attacks
C. HTML injection attacks
D. Python injection attacks
A#Q27ANS=C

A#Q28. The . . .directive is one of the most fundamental


directives in AngujarJS. The. . . directive inserts the
result of an expression into the HTML template.
A. Debug
B. Interpolation
C. Matching
D. Controller
A#Q28ANS=B

A#Q29. There is a controller which takes single parameter.


We call it. . . parameter.
A. $param
B. $control
C. $scope
D. $scont
A#Q29ANS=C

A#Q30. How to associate an object to a key on a node?


A. getUserData()
B. cloneNode()
C. setUserData(key,data,handler)
D. none of the mentioned
A#Q30ANS=C
A#Q31. Which of the following Node types have a node value
equal to null?
A. Document
B. DocumentFragment
C. DocumentType
D. All of the mentioned

A#Q31ANS=D

A#Q32. Which of the following is true about AngularJS service?

A.Services are JavaScript functions.

B.Services are responsible to do specific tasks only

C.Inbuilt services are always prefixed with $ symbol.

D.All of the above.


A#Q32ANS=D

A#Q33.Which of the following is true about uppercase filter?

A. Uppercase filter is a function which takes text as input.

B.Uppercase filter converts a text to upper case text.

C.Both of the above.

D.None of the above.


A#Q33ANS=B

A#Q34. Which of the following is the correct way for writing


Java Script array?
A. var salaries = new Array( 1:39438, 2:39839 3:83729)
B. var salaries = new (Array:1=39438, Array:2=39839, Array:3=83729)
C. var salaries = new Array(39438,39839,83729)
D. var salaries = new Array() values=39438,39839,83729
A#Q34ANS=C

A#Q35.Which of the following statements are false for Java script?


A. JavaScript can react to events
B. JavaScript can read and write HTML elements
C. JavaScript cannot be used to create cookies
D. Both b and c above
A#Q35ANS=C

A#Q36.Which of the following is not a valid JavaScript


variable name?
A. 2java
B. _java_and_ java _names
C. javaandjava
D. None of the above
A#Q36ANS=A

A#Q37.Which is the correct way to write a JavaScript array?


A. var txt = new Array(1:"arr",2:"kim",3:"jim")
B. var txt = new Array:1=(" arr ")2=("kim")3=("jim")
C. var txt = new Array("arr ","kim","jim")
D. var txt = new Array=" arr ","kim","jim"
A#Q37ANS=C

A#Q38. How do we get the DOM object in JavaScript?


A. getElementbyId()
B. getObject()
C. getElement()
D. none of the mentioned
A#Q38ANS=A

A#Q39. Which event handler is triggered when the user�s


mouse moves away from a link?
A. onMouseOver
B. onMouseOut
C. onMouse
D. onMouseOnto
A#Q39ANS=B

A#Q40. What is the purpose of XMLHttpRequest?


A. Multiple loading
B. Load content by loading new document
C. Load content without loading new document
D. None of the mentioned
A#Q40ANS=C

You might also like