Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

What is event binding in Angular?
A. Binding styles
B. Binding properties
C. Binding data
D. Binding DOM events to component methods using `(event)` syntax
Direction: Choose the correct option

Q2.

How do you pass the event object to an event handler?
A. e
B. $event
C. this.event
D. event
Direction: Choose the correct option

Q3.

What does `(click)='onSave($event)'` do?
A. Sets the click property
B. Calls `onSave` with the event object when the element is clicked
C. Calls `onSave` without parameters
D. Binds the click event to the `$event` variable
Direction: Choose the correct option

Q4.

Can you use template statements with multiple lines?
A. Yes, but it's not recommended
B. No, only single expressions
C. Yes, using semicolons
D. No, only method calls
Direction: Choose the correct option

Q5.

What is the purpose of `$event` in event binding?
A. To access the DOM event payload
B. To access the module
C. To access the template reference
D. To access component data
Direction: Choose the correct option

Q6.

How do you bind to a custom event emitted by a child component?
A. Using `@Output`
B. All of the above
C. Using same `(eventName)='handler()'` syntax
D. Using `EventEmitter`
Direction: Choose the correct option

Q7.

What is event filtering?
A. Event propagation
B. Filtering events by type
C. Handling events only under certain conditions
D. Blocking events
Direction: Choose the correct option

Q8.

What is the difference between `(click)` and `on-click`?
A. `(click)` is native
B. They are the same
C. `on-click` is Angular syntax
D. `(click)` is Angular event binding; `on-click` is not standard
Direction: Choose the correct option

Q9.

Can you bind to multiple events on the same element?
A. Only with special syntax
B. Only using host listeners
C. No, only one
D. Yes, separate event bindings for each event
Direction: Choose the correct option

Q10.

How do you prevent default event behavior?
A. Use `@HostListener`
B. Return false
C. Use `preventDefault` directive
D. Call `$event.preventDefault()` in the handler