I would like to add the ngdoc documentation to the function declaration in the angular service. How can I do this for myFunction in the example below?
I believe that I need something like @closure, @functionOf or @functionIn.
Note that (unlike myMethod) myFunction is not a method.
angular .module('myApp') .factory('myService', function() { 'use strict'; var x = 0; function myFunction (z) { x++; x += z; } return { myMethod : function (x) { myFunction(x); } }; })
source share