Search code examples
htmlcssangularfrontendsingle-page-application

Angular Reusable Component with same selector


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


Solution

  • 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