Replaced client script with Angular controller