forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirective.template.html
69 lines (62 loc) · 1.95 KB
/
directive.template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{% import "lib/macros.html" as lib -%}
{% extends "api/api.template.html" %}
{% block additional %}
<h2>Directive Info</h2>
<ul>
{% if doc.scope %}<li>This directive creates new scope.</li>{% endif %}
<li>This directive executes at priority level {$ doc.priority $}.</li>
{% if doc.multiElement %}<li>This directive can be used as {@link $compile#-multielement- multiElement}</li>{% endif %}
</ul>
{% block usage %}
<h2 id="usage">Usage</h2>
<div class="usage">
{% if doc.usage %}
{$ doc.usage | marked $}
{% else %}
<ul>
{% if doc.restrict.element %}
<li>as element:
{% code %}
<{$ doc.name | dashCase $}
{%- for param in doc.params %}
{$ lib.directiveParam(param.alias or param.name, param.type, '="', '"') $}
{%- endfor %}>
...
</{$ doc.name | dashCase $}>
{% endcode %}
</li>
{% endif -%}
{%- if doc.restrict.attribute -%}
<li>as attribute:
{% code %}
<{$ doc.element $}
{%- for param in doc.params %}
{$ lib.directiveParam(param.name, param.type, '="', '"') $}
{%- endfor %}>
...
</{$ doc.element $}>
{% endcode %}
</li>
{% endif -%}
{%- if doc.restrict.cssClass -%}
<li>as CSS class:
{% code %}
{% set sep = joiner(' ') %}
<{$ doc.element $} class="
{%- for param in doc.params -%}
{$ sep() $}{$ lib.directiveParam(param.name, param.type, ': ', ';') $}
{%- endfor %}"> ... </{$ doc.element $}>
{% endcode %}
</li>
{% endif -%}
{%- endif %}
</div>
{% endblock -%}
{% include "lib/params.template.html" %}
{% include "lib/events.template.html" %}
{%- if doc.animations %}
<h2 id="animations">Animations</h2>
{$ doc.animations | marked $}
{$ 'module:ngAnimate.$animate' | link('Click here', doc) $} to learn more about the steps involved in the animation.
{%- endif -%}
{% endblock %}