docs(upgrade): restrict component directive to elements

The `heroDetail` directive is shown as an example of a component directive, such as those built using the `.component()` helper in v1.5+. In order for the directive to be functionaly equivalent with the component directive created with `.component`, it needs to be restricted to elements only. (If the `restrict` is omitted, it defaults to `'AE'`, which would also match attributes.)

/cc @teropa
This commit is contained in:
Georgios Kalpakas 2016-06-05 14:59:19 +03:00
parent 885aa04cc9
commit 2492ea6874
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
// #docregion
export function heroDetailDirective() {
return {
restrict: 'E',
scope: {},
bindToController: {
hero: '=',