News for hackers. Stuff that matters.
Re:AngularJS: A Retrospective by keda on Wednesday March 26, 2014 @02:53PM (#7475545)
I think it's miss-using the service in this example. The example should be using factory: .factory('RemoteResource', function($http){ return {retrieve: function(){ $http.get("url"); }} })

Service should be like this: .service('RemoteResource', function($http){ this.retrieve = function(){ $http.get("url"); } })

See Stackoverflow: http://stackoverflow.com/questions/15666048/angular-js-servi...

There are no comments on this comment yet.