mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Add directive info to directive docs
Directive doc objects have a directiveInfo property that has two
properties: doc.directiveInfo.type and doc.directiveInfo.properties.
type: 'Component' or 'Directive'
properties: array of objects in the format { name, values }, where name
is either 'selector', 'inputs', or 'outputs' and values is an array of
strings.
Ex: {
type: 'Component',
properties: [
{
name: 'selector',
values: ['button', '[button]']
},
{
name: 'inputs',
values: ['icon', 'color']
}
]
}
This commit is contained in:
8
scripts/docs/templates/common.template.html
vendored
8
scripts/docs/templates/common.template.html
vendored
@@ -118,10 +118,10 @@ docType: "<$ doc.docType $>"
|
||||
defined in <$ githubViewLink(doc) $>
|
||||
</p>
|
||||
|
||||
<@- if doc.decorators @>
|
||||
<h2>Annotations</h2>
|
||||
<@- for decorator in doc.decorators @>
|
||||
<h3 class="annotation">@<$ decorator.name $><$ paramList(decorator.arguments) $></h3>
|
||||
<@- if doc.directiveInfo @>
|
||||
<h2><$ doc.directiveInfo.type $></h2>
|
||||
<@- for prop in doc.directiveInfo.properties @>
|
||||
<span><$ prop.name $>: <@ for v in prop.values @><$ v $><@ if not loop.last @>, <@ endif @><@ endfor @></span>
|
||||
<@ endfor @>
|
||||
<@ endif -@>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user