<tg-list tg-compact="true">
<tg-list-item>foo</tg-list-item>
<tg-list-item>bar</tg-list-item>
</tg-list>
<ul class="o-list o-list--compact">
<li class="o-list-item">foo
</li>
<li class="o-list-item">bar
</li>
</ul>
<tg-list class="o-list-icon o-list-icon--compact">
<ul>
<tg-list-item>
<li class="o-list-item">foo</li></tg-list-item>
<tg-list-item>
<li class="o-list-item">bar</li></tg-list-item>
</ul>
</tg-list>
<tg-list class="o-list-icon o-list-icon--compact">
<tg-list-item>foo</tg-list-item>
<tg-list-item>bar</tg-list-item>
</tg-list>
Hi Kenese,
You can use a attribute selector in stead of a tag selector for your directive.
<ul>
<li tg-list-item>...</li>
<li tg-list-item>...</li>
</ul>
Regards
Sander
Thanks for the response. I was trying to avoid that as we have a large component library, where we use element directives for all of the components. We don't really want the consumers of the components to have to remember specifically lists need to use the attribute syntax
> --
> You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/rq94vFZagNs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
> To post to this group, send email to ang...@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
--
public link = ($scope: angular.IScope, $element: angular.IAugmentedJQuery) => {
$element.find('tg-list-item').wrap('<li></li>');
My guess is this might not work with tg-list-item in a repeater actually. Doh. Haven't tried yet tho, will do in the morn
--
Great, thanks again
--
public link = ($scope: angular.IScope, $element: angular.IAugmentedJQuery) => {
$element.wrap('<li></li>');