Advertisement
Guest User

Untitled

a guest
Dec 4th, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. app.controller('AppCtrl', ['$scope', 'getTopicContent', function($scope,getTopicContent){
  2. getTopicContent.request().success(function(data, $scope){
  3. $scope.threadContent = data;
  4. });
  5.  
  6. }]);
  7.  
  8. app.factory('getTopicContent', ['$http', function($http, $scope){
  9.  
  10. var query = function() {
  11. return $http({
  12. url: "http://www.corsproxy.com/mydata.me/level1/list.php",
  13. method: "GET"
  14. })
  15. }
  16.  
  17. return {
  18. request : function(){
  19. return query();
  20. }
  21.  
  22. }
  23. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement