Angular Reusable Component with same selector

34 Views Asked by At

Can we create reusable html elements in the same component and call the element separately in another component?? is there any solution to do that if possible please share your guidance.

code that I wrote:

I need to call these elements separately enter image description here

1

There are 1 best solutions below

0
Preeti Patel On BEST ANSWER

You need to create a separate component,Which you need to use in multiple places & call that component using it's selector.

Reference link => https://medium.com/@arpitmalaiya/3-ways-to-include-component-in-angular-application-dcbd4d0f4c1a