Top 150+ Solved Angular-JS MCQ Questions Answer
Q. 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
Q. You cannot use AngularJS directives to tell AnguluarJS how to mix the data into the HTML template.
a. True
b. False
c. none
d. all
Q. 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
Q. The . . . . . directive is used if you want to add or remove HTML elements from the DOM based on data in the model.
a. ng-switch
b. ng-model
c. ng-Disabled
d. ng-Cloak
Q. Event binding can be defined . . . . . . . . .
a. by wrapping the event in (parenthesis)
b. by prefixing it with in
c. by wrapping the event in {curly brackets}
d. by prefixing it with on
Q. Events in Angular 2 behave like normal DOM events. They can bubble up butcannot propagate down.
a. True
b. False
c. none
d. all
Q. EventEmitter class is used by directives and components to emit customEvents.
a. True
b. False
c. none
d. all
Q. @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.
Q. . . . . . . . . need to be passed as a parameter in the event callback from the template to capture the event object.
a. $event.start
b. $events
c. $eventobj
d. $event
Q. Calling . . . . . . . . on the event prevents propagation.
a. stopEventPropagation
b. preventEventPropagation
c. stopPropagation
d. preventPropagation
Q. Events on child elements are propagated upwards, and hence event binding isalso possible on a parent element.
a. True
b. False
c. none
d. all