Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs-bug(COMPONENT): Issue with Angular Material Documentation: Incorrect mat-table Example #30031

Open
shivhaldikar opened this issue Nov 17, 2024 · 0 comments
Labels
docs This issue is related to documentation needs triage This issue needs to be triaged by the team

Comments

@shivhaldikar
Copy link

shivhaldikar commented Nov 17, 2024

Documentation Feedback

Description:
The example provided in the Angular Material documentation for mat-table appears to be incorrect. The current example uses the <table> tag, but it should be using <mat-table> instead. This discrepancy may cause confusion for new developers who rely on the documentation for accurate guidance.

Problem Details:
On the Angular Material mat-table documentation page, the code examples use the standard '<table>' tag, which does not support Angular Material's dataSource binding. New developers might encounter errors like "Can't bind to 'dataSource' since it isn't a known property of 'table'" if they follow the provided example as-is.

Expected Behavior:
The documentation should demonstrate the proper usage of <mat-table> instead of <table>. Updating the examples to reflect the correct component will make the documentation more accurate and prevent confusion for developers.

Suggestion:
Replace instances of <table> with <mat-table> in the code examples, ensuring that all Angular Material features, like dataSource binding, are correctly showcased. This will provide developers with working examples that do not require additional troubleshooting.

Additional Context:
Many developers are finding the correct solution only after searching online, as seen in this Stack Overflow discussion. It would be beneficial to keep the documentation up to date with working code examples to help new developers avoid unnecessary confusion.

Affected documentation page

https://v13.material.angular.io/components/table/examples

@shivhaldikar shivhaldikar added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is related to documentation needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

1 participant