[Solved] Issue returning function in AngularJS Service [closed]
The error here is that lat is not identified as a function on ‘origin’. Now your factory should return an object that contains a function and not a function. You will perform your call to that function after injecting the function to whereever you want. web.factory(‘distance’, function() { // Should this be here??? Number.prototype.toRad = … Read more