feat(core): map 'for' attribute to 'htmlFor' property (#10546)

This improves ergonomics a bit by allowing people to write:
`<label [for]="ctxProp"></label>`.
This is similar to the existing class -> className mapping.

Closes #7516
This commit is contained in:
Pawel Kozlowski
2016-11-10 00:21:27 +01:00
committed by Victor Berchet
parent 4595a61aeb
commit 634b3bb88b
2 changed files with 14 additions and 0 deletions

View File

@ -231,6 +231,7 @@ const SCHEMA:
const _ATTR_TO_PROP: {[name: string]: string} = {
'class': 'className',
'for': 'htmlFor',
'formaction': 'formAction',
'innerHtml': 'innerHTML',
'readonly': 'readOnly',