Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.run(["$rootScope", "$http", "BASE_URL", "GetRecDelTrash",
  2.     function($rootScope, $http, BASE_URL, GetRecDelTrash){
  3.     // init linkNum
  4.     $rootScope.linkNum = 1;
  5.     $rootScope.items = [];
  6.     console.log(BASE_URL + '/recently');
  7.     GetRecDelTrash.getData().then(function(data) {
  8.         $rootScope.items = data;
  9.               $rootScope.$apply();
  10.     });
  11.     // why is rootScope.items undefined here?
  12.     alert($rootScope.items);
  13.    
  14. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement