SHARE
TWEET

Untitled

a guest Dec 17th, 2014 174 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.controller("IdeasCtrl", function($scope, $http) {
  2.  $http.get('ideas/find').
  3.     success(function(data, status, headers, config){    
  4.     $scope.ideas = data;
  5.     });  
  6.    
  7.  $scope.urlcount = function() {
  8.     angular.forEach($scope.ideas, function(value, key) {
  9.         var currenturl = value.url;
  10.         console.log(currenturl);
  11.         http.get('https://graph.facebook.com/?'+currenturl).
  12.         success(function(data, status, headers, config){
  13.             this.push(data.shares);
  14.         });
  15.     });
  16.  };
  17. });
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