You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML attributes should come in this particular order for easier reading of code.
class
id, name
data-*
src, for, type, href, value
title, alt
role, aria-*
Classes make for great reusable components, so they come first. Ids are more specific and should be used sparingly (e.g., for in-page bookmarks), so they come second.
After that I would place Angular attributes, maybe something like this order
Input Binding
Event Binding
Banana Box Binding
Template Binding
Template Reference
However, in Vue this is configurable, so this maybe configurable as well here.
The text was updated successfully, but these errors were encountered:
From eslint-plugin-vue~attributes-order
I think it would be nice to have something like this in Angular as well. However, I would suggest to follow first some HTML style guides as:
After that I would place Angular attributes, maybe something like this order
However, in Vue this is configurable, so this maybe configurable as well here.
The text was updated successfully, but these errors were encountered: