This way, you dont have to rewrite the same code lines for a task every time. How to empty the content of an element using AngularJS ? The latest Lifestyle | Daily Life news, tips, opinion and advice from The Sydney Morning Herald covering life and relationships, beauty, fashion, health & wellbeing blockName-elemName_modName_modVal. The onclick event attribute in HTML works when the user clicks on the button. Just above the return statement is a good place: Heading elements like our