From b386d1134a54b252fb1e57ae1ded25526295bbe1 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Wed, 2 Dec 2015 16:10:14 -0800 Subject: [PATCH] doc(camelCase Angular): migration guide --- modules/angular2/docs/migration/kebab-case.md | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 modules/angular2/docs/migration/kebab-case.md 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 ``, +- `