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:
parent
885aa04cc9
commit
2492ea6874
|
@ -1,6 +1,7 @@
|
|||
// #docregion
|
||||
export function heroDetailDirective() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {},
|
||||
bindToController: {
|
||||
hero: '=',
|
||||
|
|
Loading…
Reference in New Issue