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
|
// #docregion
|
||||||
export function heroDetailDirective() {
|
export function heroDetailDirective() {
|
||||||
return {
|
return {
|
||||||
|
restrict: 'E',
|
||||||
scope: {},
|
scope: {},
|
||||||
bindToController: {
|
bindToController: {
|
||||||
hero: '=',
|
hero: '=',
|
||||||
|
|
Loading…
Reference in New Issue