diff --git a/modules/angular2/docs/migration/kebab-case.md b/modules/angular2/docs/migration/kebab-case.md new file mode 100644 index 0000000000..80a3497fc2 --- /dev/null +++ b/modules/angular2/docs/migration/kebab-case.md @@ -0,0 +1,162 @@ +Angular2 templates are now case sensitive. + +## Overview + +Where you used to write: + + + +in order to: + - bind to the `someEvent` event, + - bind to the `someProperty` property, + - create a `someVar` local variable + +You should now write: + + + +Notes: + - while tag name are case sensitive, the best practice is to use dash case for component elements so that the browser + interpret them as custom elements, + - `(some-event)` would now bind to the `some-event` event (i.e. there is no implicit dash to camel case conversion), + - `(some-property)` would now bind to the `some-property` property (i.e. there is no implicit dash to camel case conversion), + - `#some-var` is not allowed any more ("-" can not be used in variable names). + +## Migration + +#### Templates + +1. Directives selectors, property bindings, event bindings, template variables and template element attributes should be changed to camel case: + +Examples: +- `

` should be changed to `

`, +- `` should be changed to ``, +- `` should be changed to ``, +- `` should be changed to ``, +- `` should be changed to ``, +- `