mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(dgeni): differentiate properties v methods. Closes driftyco/ionic-site#498
This commit is contained in:
@ -12,6 +12,12 @@ module.exports = function collectInputsOutputs() {
|
||||
|
||||
memberLoop:
|
||||
for (var i in doc.members) {
|
||||
|
||||
// identify properties to differentiate from methods
|
||||
if (typeof doc.members[i].parameters == 'undefined') {
|
||||
doc.members[i].isProperty = true;
|
||||
}
|
||||
|
||||
if (doc.members[i].decorators && doc.members[i].decorators.length) {
|
||||
|
||||
decoratorLoop:
|
||||
|
8
scripts/docs/templates/common.template.html
vendored
8
scripts/docs/templates/common.template.html
vendored
@ -128,11 +128,11 @@ angular_controller: APIDemoCtrl <@ endif @>
|
||||
|
||||
<@- macro functionSyntax(fn) @>
|
||||
<@- set sep = joiner(', ') -@>
|
||||
<code><$ fn.name $>(<@- for param in fn.params @><$ sep() $>
|
||||
<code><$ fn.name $><@- if not fn.isProperty @>(<@ endif -@><@- for param in fn.params @><$ sep() $>
|
||||
<@- if param.type.optional @>[<@ endif -@>
|
||||
<$ param.name $>
|
||||
<@- if param.type.optional @>]<@ endif -@>
|
||||
<@ endfor @>)</code>
|
||||
<@ endfor @><@- if not fn.isProperty @>)<@ endif -@></code>
|
||||
<@ if fn.alias @><small>(alias: <$ fn.alias $>)</small><@ endif @>
|
||||
<@ endmacro -@>
|
||||
|
||||
@ -249,7 +249,7 @@ Improve this doc
|
||||
|
||||
|
||||
<@- if doc.statics.length -@>
|
||||
<h2><a class="anchor" name="static-methods" href="#static-methods"></a>Static Methods</h2>
|
||||
<h2><a class="anchor" name="static-members" href="#static-members"></a>Static Members</h2>
|
||||
<@- for method in doc.statics @><@ if not method.internal @>
|
||||
<div id="<$ method.name $>"></div>
|
||||
<h3><a class="anchor" name="<$ method.name $>" href="#<$ method.name $>"></a><$ functionSyntax(method) $></h3>
|
||||
@ -283,7 +283,7 @@ Improve this doc
|
||||
<!-- instance methods on the class -->
|
||||
<@- if doc.members and doc.members.length @>
|
||||
|
||||
<h2><a class="anchor" name="instance-methods" href="#instance-methods"></a>Instance Methods</h2>
|
||||
<h2><a class="anchor" name="instance-members" href="#instance-members"></a>Instance Members</h2>
|
||||
<@- for method in doc.members @>
|
||||
|
||||
<div id="<$ method.name $>"></div>
|
||||
|
Reference in New Issue
Block a user