[Table] Error when using ng-content
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
`md-table` should wait until the `ng-content` replaced.
#### What is the current behavior?
`md-table` throws ` Cannot read property 'getColumnsDiff' of undefined`.
#### What are the steps to reproduce?
Put `ng-content` inside `md-table`.
https://plnkr.co/edit/RpOncq9lbwPcjAGjXSyR?p=preview
#### What is the use-case or motivation for changing an existing behavior?
Anyone that want to create a component with configurable `md-table` inside cannot do it.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: `4.4.0-RC.0` in the plunker, but this is not working with any version.
Material: `2.0.0-beta.10`
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi trong Plunker được liên kết với ng-content bên trong md-table, sau đó theo dõi thời điểm md-table truy cập getColumnsDiff so với việc thay thế nội dung được chiếu. Hoàn tất khi md-table chờ nội dung được chiếu và không còn ném lỗi thuộc tính undefined khi được sử dụng bên trong một component có thể cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 58/100