what is use of event in angularjs