add AngularJS controller to autofetch using AJAX