Corrected Indentation. Added event handling within the view itself
Indentation