Angular used web-components. For example if we want to create a button we will always create new custom button instead of using the semantic button. Can you share best practice to tackle this. Thanks.
Lead for JavaScript e2e DX at Microsoft Azure. ex-Architect at MongoDB. ex-Principal Architect Adobe Stack at Cognizant. GDE for #Angular and #WebTechnologies Opinions my own.
Education
The Internet
Pronouns
she/her
Work
Principal JavaScript e2e DX/Dev Tools Lead @Microsoft Azure
Good point. You mean when you create a component, being whatever it is, the @Component decorator creates an element/selector in the DOM, called as the property selector indicates, that as any HTMLElement has a bunch of properties. But it is multipurpose, and the key is what you put inside the template. When I create a button component, <app-button> will have a native <button> element in its template.
Angular used web-components. For example if we want to create a button we will always create new custom button instead of using the semantic button. Can you share best practice to tackle this. Thanks.
Good point. You mean when you create a component, being whatever it is, the @Component decorator creates an element/selector in the DOM, called as the property selector indicates, that as any HTMLElement has a bunch of properties. But it is multipurpose, and the key is what you put inside the template. When I create a button component,
<app-button>
will have a native<button>
element in its template.Thank you for replying! Will do that.