मैं एक कोणीय सेवा के भीतर एक समारोह घोषणा में ngdoc दस्तावेज जोड़ना चाहता हूं। मैं नीचे दिए गए उदाहरण में अपने समारोह के लिए यह कैसे कर सकता हूं?कोणीय सेवा में फ़ंक्शन घोषणा को दस्तावेज़ित करने के लिए ngdoc का उपयोग कैसे किया जा सकता है?
मुझे लगता है कि मुझे @closure, @functionOf या @functionIn जैसे कुछ चाहिए।
कृपया ध्यान दें कि (myMethod के विपरीत) myFunction एक विधि नहीं है।
/**
* @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);
}
};
})
मैं यहाँ ngdocs के लिए दस्तावेज़ पाया: https://github.com/idanush/ngdocs/wiki/API-Docs-Syntax – paulhhowells
और यहाँ: https://github.com/angular /angular.js/wiki/Writing-AngularJS- दस्तावेज – paulhhowells