Google News
logo
Vue.JS - Quiz(MCQ)
What happens when a View Model is destroyed?
A)
Doesn’t affect even listeners
B)
All event listeners are automatically removed
C)
All event listeners are should be manually removed
D)
None of the above

Correct Answer :   All event listeners are automatically removed


Explanation : A ViewModel code can be of pure logic and DOM-free because you don’t have to manually attach event listeners in JS. This makes testing a lot easier. All event listeners are automatically removed when a ViewModel is destroyed.

Advertisement