Updated to use Angular controller.