I would like to add ngdoc documentation to a function declaration within an angular service. How can I do this for myFunction in the example below?
I reckon I need something like @closure, @functionOf or @functionIn.
Please note that (in contrast to myMethod) myFunction is not a method.
/**
* @ngdoc service
* @name myApp.service:myService
* @description
* My application.
*/
angular
.module('myApp')
.factory('myService', function() {
'use strict';
var x = 0;
/**
* @ngdoc function
* @name ?
* @description
* How can this be identified as being within the closure of
* myService, and not be described as a constructor?
*/
function myFunction (z) {
x++;
x += z;
}
return {
/**
* @ngdoc method
* @name myMethod
* @methodOf myApp.service:myService
* @description
* A method of myService.
*/
myMethod : function (x) {
myFunction(x);
}
};
})