ordercloud-api / ngx-shopper

Open-source B2B e-commerce. Built with the OrderCloud.io API and maintained by the OrderCloud team
MIT License
9 stars 22 forks source link

Can we use the native [readonly] attribute instead of a new Component Input? #127

Open robertsoniv opened 6 years ago

robertsoniv commented 6 years ago

Once again, just browsing around (still on LineItemCard). Wouldn't it be just as effective to use the native readonly attribute in this scenario? https://github.com/ordercloud-api/ngx-shopper/blob/881aafb5cd2dfb93223b8470ab8726b720527818/src/UI/Buyer/src/app/shared/components/line-item-card/line-item-card.component.ts#L15

That being said, there may be others out there... I haven't done a search yet.

oliverheywood451 commented 6 years ago

Hey Rob, psyched that you're looking at the base app. Here we're trying to control whether the component is for display only (readonly). If its false you can do stuff like change quantity or delete lineitem.