working API calls and displaying data through AngularJS