Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 41d583f

Browse files
marcin-wosinekpetebacondarwin
authored andcommitted
feat(ngdoc/multiElement tag): directives can declare that they support multiElement
See angular/angular.js#11104 Closes #109
1 parent b861f6b commit 41d583f

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

ngdoc/tag-defs/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ module.exports = [
1313
require('./title'),
1414
require('./parent'),
1515
require('./packageName'),
16-
require('./scope')
16+
require('./scope'),
17+
require('./multiElement')
1718
];

ngdoc/tag-defs/multiElement.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function() {
2+
return {
3+
name: 'multiElement',
4+
transforms: function(doc, tag) { return true; }
5+
};
6+
};

ngdoc/tag-defs/multiElement.spec.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var tagDefFactory = require('./multiElement');
2+
3+
describe("scope tag-def", function() {
4+
it("should transform the value to true", function() {
5+
var tagDef = tagDefFactory();
6+
expect(tagDef.transforms()).toEqual(true);
7+
});
8+
});

ngdoc/tag-defs/parent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = function() {
22
return { name: 'parent' };
3-
};
3+
};

ngdoc/templates/api/directive.template.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ <h2>Directive Info</h2>
66
<ul>
77
{% if doc.scope %}<li>This directive creates new scope.</li>{% endif %}
88
<li>This directive executes at priority level {$ doc.priority $}.</li>
9+
{% if doc.multiElement %}<li>This directive can be used as {@link $compile#-multielement- multiElement}</li>{% endif %}
910
</ul>
1011

1112
{% block usage %}
@@ -55,7 +56,7 @@ <h2 id="usage">Usage</h2>
5556
{% endcode %}
5657
</li>
5758
{% endif -%}
58-
59+
5960
{%- endif %}
6061
</div>
6162
{% endblock -%}

0 commit comments

Comments
 (0)