angular-jsdoc
angular-jsdoc copied to clipboard
angular-template update crashes js-doc
jsTemplate error in line 4
2 ' <ul class="chips">\r'
3 ' <% if (directiveScope) { %><li class="chip"><%= directiveScope %></li><% } %>\r'
4 ' <% var _restrict = restrict; for(var i in _restrict) { var rest = _restrict[i]; %><% if (restrict) { %><li class="chip"><%=rest%></li><% } %><% } %>\r'
5 ' </ul>\r'
6 '\r'
7 ' <div class="clearfix"></div>\r'
processing template: class.html
error in line 4
jsTemplate error in line 74
C:\Users\........\node_modules\angular-template\index.js:87
throw e.raisedOnceException;
^
ReferenceError: restrict is not defined
After searching it seems that a recent update in angular-template leads to angular-jsdoc crashing. Reverting back to angular-template 2.1.4 solves the problem.
+1, it's the single line treatment of ht-if and ht-repeat (<li ... ht-if="restrict" ht-repeat="rest in restrict">, class.html). Despite ht-if="restrict" is false ht-repeat-expression gets evaluated. Splitting the lists in half with ht-if in ul instead of li fixes the issue.
You can also use this forked version that fixes the problem: https://github.com/Monsido/angular-jsdoc
Could we get this fix in the main npm/git repo?
So we don't have to use a special "fixed" forked version.
I'm still getting these error on angular-jsdoc v1.5.0, v1.4.2, and v1.4.1.
I will say that i am using "angular-jsdoc/angular-template" as my template. I know the README says that this is old and i should be using "default" instead. However, "default" does not have a Filter and is not made with Angular ... which is the name of the project... so ya.
Will be this fixed? I've npm installed angular-jsdoc a couple of days ago and I'm also getting the "restrict is not defined" error.
+1 waiting for a fix
this is merged and published.