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:
Tim Lancina
2015-10-09 20:32:17 -05:00
parent f8fdcb6333
commit 551d1998f3
4 changed files with 43 additions and 6 deletions

View File

@@ -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 -@>