Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Created July 14, 2013 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leandromoreira/5994598 to your computer and use it in GitHub Desktop.
Save leandromoreira/5994598 to your computer and use it in GitHub Desktop.
angular.module('twitter')
.factory('theirTwitterFactory', function($http){
var factory = {};
$http.get('/data/theirs.json')
.success(function(data, status, headers, config) {
factory.tweets = data;
});
return {
tweets: function(){
return factory.tweets;
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment