diff --git a/tools/api-builder/angular.io-package/templates/class.template.html b/tools/api-builder/angular.io-package/templates/class.template.html index 2c516b7ce6..1ae71026de 100644 --- a/tools/api-builder/angular.io-package/templates/class.template.html +++ b/tools/api-builder/angular.io-package/templates/class.template.html @@ -53,9 +53,29 @@ p.location-badge. {% endif -%} {% endif %} +{% if doc.statics.length -%} +.l-main-section + h2 Static Members +{%- for member in doc.statics %}{% if not member.internal %} + .l-sub-section + h3#{$ member.name | toId $} + pre.prettyprint + code. + {$ member.name $}{$ paramList(member.parameters) | indent(8, false) | trim $}{$ returnType(member.returnType) $} + + :marked + {%- if member.notYetDocumented %} + *Not Yet Documented* + {% else %} +{$ member.description | indentForMarkdown(6) | replace('## Example', '') | replace('# Example', '') | trimBlankLines $} + {% endif %} +{% endif %}{% endfor %} +{%- endif -%} + + {% if doc.members.length -%} .l-main-section - h2 Members + h2 Instance Members {%- for member in doc.members %}{% if not member.internal %} .l-sub-section h3#{$ member.name | toId $} diff --git a/tools/api-builder/typescript-package/processors/readTypeScriptModules.js b/tools/api-builder/typescript-package/processors/readTypeScriptModules.js index 3739b7b337..910b28d2dd 100644 --- a/tools/api-builder/typescript-package/processors/readTypeScriptModules.js +++ b/tools/api-builder/typescript-package/processors/readTypeScriptModules.js @@ -132,8 +132,12 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo, if (a.name < b.name) return -1; return 0; }); + exportDoc.statics.sort(function(a, b) { + if (a.name > b.name) return 1; + if (a.name < b.name) return -1; + return 0; + }); } - }); }); }