Hi
How to use Angular Material Table as common component. I don't want to replicate in all components.
Thanks
Hi
How to use Angular Material Table as common component. I don't want to replicate in all components.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jayraj ChhayaPosted Jun 19, 2024, 12:03 PM
To use Angular Material Table as a common component, you can create a custom Angular component that encapsulates the table functionality. This approach ensures reusability and consistency throughout your application. Here's a basic example of how you can achieve this:
shared-table.component.htmlfile:shared-table.component.tsfile:app-shared-tableselector in any component where you want to display the shared table: