Open robertsoniv opened 6 years ago
I like this suggestion a lot.
I actually had looked into this previously. Its in the angular style guide specifically to not use "on" prefix. One of the reasons is one you actually brought up (because there's already native browser attribute handlers)
https://angular.io/guide/styleguide#dont-prefix-output-properties
We could deviate from the style guide but i think its really nice to just have a well-documented style guide we can point people to.
We should probably add, that we follow the angular style guide to the readme 🤔
While looking over some of the code I noticed some odd naming conventions for the component outputs on the LineItemCard: https://github.com/ordercloud-api/ngx-shopper/blob/881aafb5cd2dfb93223b8470ab8726b720527818/src/UI/Buyer/src/app/shared/components/line-item-card/line-item-card.component.ts#L16-L17
I'm sure there are a few more sprinkled about.
Since outputs will often be used when you may not have the component's source readily available I think it's important they are named predictably. Would this issue's conversation be a good place to discuss possible naming conventions? Here's my two cents:
Obviously, you'd have to be careful and avoid using native browser attribute handlers, like
onClick
.