Files
ionic-framework/scripts/docs/templates/api/directive.template.html
2015-09-01 15:07:11 -05:00

57 lines
1.2 KiB
HTML

<@ include "lib/macros.html" -@>
<@ extends "api/api.template.html" @>
<@ block additional @>
<@ block usage @>
<h2 id="usage">Usage</h2>
<@ if doc.usage @>
<$ doc.usage $>
<@ else @>
<@ if doc.restrict.element @>
```html
<<$ doc.name | dashCase $>
<@- for param in doc.params @>
<$ directiveParam(param.alias or param.name, param.type, '="', '"') $>
<@- endfor @>>
...
</<$ doc.name | dashCase $>>
```
<@ endif -@>
<@- if doc.restrict.attribute -@>
```html
<<$ doc.element $>
<@- for param in doc.params @>
<$ directiveParam(param.name, param.type, '="', '"') $>
<@- endfor @>>
...
</<$ doc.element $>>
```
<@ endif -@>
<@- if doc.restrict.cssClass -@>
```html
<@ set sep = joiner(' ') @>
<<$ doc.element $> class="
<@- for param in doc.params -@>
<$ sep() $><$ directiveParam(param.name, param.type, ': ', ';') $>
<@- endfor @>"> ... </<$ doc.element $>>
```
<@ endif -@>
<@- endif @>
<@ endblock -@>
<@ if doc.params @>
<h2 id="api" style="clear:both;">API</h2>
<$ paramTable(doc.params, true) $>
<@ endif @>
<@ include "lib/events.template.html" @>
<@ endblock @>