Adding Alerts to rootScope and making all the calls. Also moved controller to the table and ng-init to the tbody