Skip to content

Commit

Permalink
feat(ngdoc/multiElement tag): directives can declare that they suppor…
Browse files Browse the repository at this point in the history
…t multiElement

See angular/angular.js#11104

Closes #109
  • Loading branch information
marcin-wosinek authored and petebacondarwin committed Jun 20, 2015
1 parent b861f6b commit 41d583f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ngdoc/tag-defs/index.js
Expand Up @@ -13,5 +13,6 @@ module.exports = [
require('./title'),
require('./parent'),
require('./packageName'),
require('./scope')
require('./scope'),
require('./multiElement')
];
6 changes: 6 additions & 0 deletions ngdoc/tag-defs/multiElement.js
@@ -0,0 +1,6 @@
module.exports = function() {
return {
name: 'multiElement',
transforms: function(doc, tag) { return true; }
};
};
8 changes: 8 additions & 0 deletions ngdoc/tag-defs/multiElement.spec.js
@@ -0,0 +1,8 @@
var tagDefFactory = require('./multiElement');

describe("scope tag-def", function() {
it("should transform the value to true", function() {
var tagDef = tagDefFactory();
expect(tagDef.transforms()).toEqual(true);
});
});
2 changes: 1 addition & 1 deletion ngdoc/tag-defs/parent.js
@@ -1,3 +1,3 @@
module.exports = function() {
return { name: 'parent' };
};
};
3 changes: 2 additions & 1 deletion ngdoc/templates/api/directive.template.html
Expand Up @@ -6,6 +6,7 @@ <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 %}
Expand Down Expand Up @@ -55,7 +56,7 @@ <h2 id="usage">Usage</h2>
{% endcode %}
</li>
{% endif -%}

{%- endif %}
</div>
{% endblock -%}
Expand Down

0 comments on commit 41d583f

Please sign in to comment.