3 ms·
You can make your custom directives HTML5 compliant, see [1], you can use the HTML5 data- prefix. For instance: <sidebar></sidebar> can instead be coded as
by craigching 13y ago
You can make your custom directives HTML5 compliant, see [1], you can use the HTML5 data- prefix. For instance:
<sidebar></sidebar>
can instead be coded as:
<span data-sidebar></span>
or something similar.
[1] -- http://docs.angularjs.org/guide/directive http://docs.angularjs.org/guide/directive
- talmand 13y agoThat's my usual way, or the class-based way for older IE.
- nostrademons 13y agoCustom elements are part of the HTML5 spec too: http://w3c.github.io/webcomponents/spec/custom/ http://w3c.github.io/webcomponents/spec/custom/ The only requirement is that they have a dash in the name. So while <sidebar> is not a valid HTML5 element, <a-sidebar> would be.