SHARE
TWEET

Untitled

a guest Jan 25th, 2016 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. angular.module('ciscoImaDashboardApp').factory('dummyData', ['$q', '$http', '$sce', function($q, $http) {
  2.  
  3. apiServices.login = function(user,password,callback) {
  4.     var resultsObject = {};
  5.  
  6.     $http.get("https://magainteractive.com/prototypes/cisco-ima-dashboard/cms/web/api/login/login/?username="+user+"&password="+password+"")
  7.         .then(function(contentResponse){
  8.             resultsObject.content = contentResponse;
  9.             return $http.get("https://magainteractive.com/prototypes/cisco-ima-dashboard/cms/web/api/data/list/");
  10.         },function(error){
  11.             callback(error);
  12.         })
  13.         .then(function(dataResponse){
  14.             resultsObject.reports = dataResponse;                      
  15.             callback(resultsObject);
  16.         },function(error){
  17.             callback(error);
  18.         });    
  19. };
  20.  
  21. return apiServices;
  22.  
  23. }]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top