angular-jsdoc
angular-jsdoc copied to clipboard
$rootScope in @name create duplicate members
Hi, first of all thank you for your awesome plugin! I'm trying to add your specific tags in my jsDoc documentation, but I have a strange behaviour.
If I use $rootScope
in @name
tag before AngularJS run function, jsDoc automatically add all members founded in all source.
* Foo Description
*
* @memberof Foo
* @ngdoc Globals
* @name $rootScope
*/
angular.module("Foo").run(["$rootScope", ..., function($rootScope, ...){
...
$rootScope.memberA = false;
$rootScope.memberB = {};
This is awesome and useful, but if there is a redefinition of a member in one of the source files jsDoc duplicate it in Foo members section.
Do you have an idea of I can exclude all redefinition of a member?
Thank you
Can you post more code, specifically the code that you expect to not be redefined?
As you can see in my module run I have $rootScope.memberA = false
and $rootScope.memberB = {}
. After using jsdoc in my documentation page appears a Globals section with $rootScope item; inside this I have a the Members table with two rows:
Name | Type | Description |
---|---|---|
memberA | ||
memberB |
So, jsodc automatically detect memberA
and memberB
as @memberof
$rootScope
: it ok.
The problem occurs when I also have $rootScope.memberA = true
in one controller (or service, ...); I'd like the docs remain as before, instead I have:
Name | Type | Description |
---|---|---|
memberA | ||
memberA | ||
memberB |
Seems that angular-jsdoc (o jsDoc) doesn't check if a member is already defined and added to documentation.
Thank you
Try to replace @name $rootscope with @alias $rootscope instead.
If I replace @name with @alias the item $rootScope disappear from Globals section.