Hacker News new | comments | show | ask | jobs | submit login

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




Custom elements are part of the HTML5 spec too:

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.


That's my usual way, or the class-based way for older IE.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: