I've just started out with AngularJs and am experimenting with directives. From what I've read, these can be defined in HTML using either:
- A custom tag
- An attribute
- A class
<my-element></my-element>
<div my-element></div>
<div class="my-element"></div>
Many resources suggest using an attribute as it's the most compatible. I prefer the custom tag approach. Thankfully I only have to support modern browsers (IE10+). With this in mind, are there any other reasons why I should still use the attribute approach over a custom tag?
Any reasons welcome; compatibility, flexibility, etc.