angular / angular/components

Document why some attribute directive are dash-case and some are camelCase

Đang mở
#3,125 6 bình luận 12 reaction 0 người được giao Xem trên GitHub
area: many docs needs: discussion P4
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:

Currently there is a confusion as to why `mdInput` is an attribute directive [which is the reason why it is written as `mdInput` instead of `md-input`] & `md-button` is a component

Since `md-button`(and other button variants) are used only as html attributes, it would be easy for the user's mental model if he can write

`` instead of `` similar to ``

#### What is the expected behavior?

Ability to use button variations using camelCase such as ``

#### What is the current behavior?

All button variations needs to be used using kabab cased attribute ``

#### What is the use-case or motivation for changing an existing behavior?

Now the user needs to know how button is implemented (which is why it is kabab case instead of camel), instead end user should not care how it is implemented, instead just knows elements follow kabab case & directives follow camelCase.

This way, the implementation detail does not leak to end user

The mental model of "html element => component", "html attribute => directive" is easy to remember & intuitive for most angular developers.

#### Which versions of Angular, Material, OS, browsers are affected?

2.0.0-beta.2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Issue không nêu tên tệp, kiểm thử hay điểm vào nào. Hãy so sánh cách sử dụng mdInput và md-button hiện có để xác định công việc dự kiến là tài liệu hay thay đổi API; để hoàn thành, cần giải quyết sự mơ hồ này và либо ghi lại lý do đặt tên, либо định nghĩa hành vi camelCase được yêu cầu.

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
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.