SHARE
TWEET

Untitled

a guest Jun 1st, 2016 8 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   var test = [];
  2.  
  3.   var token = $cookies.get('token');
  4.   $http({
  5.     method: 'GET',
  6.     url: appConfig.baseURL + 'api/channels/' + $stateParams.chatId + '/',
  7.     headers: {'Authorization': 'Token ' + token}
  8.   }).then(function (response) {
  9.     var data = response.data;
  10.     $scope.chat = data;
  11.     $cookies.put('key', data.user.key);
  12.     test.push({
  13.       'ukey': data.user.key,
  14.       'id': data.user.id,
  15.     })
  16.   });
  17.   var wsKey = $cookies.get('key');
  18.   console.log(test);
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top