Changing Event detail page logic to Angularjs