From 2492ea68740062fc6595f9406664656ee6f584f5 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Sun, 5 Jun 2016 14:59:19 +0300 Subject: [PATCH] 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 --- .../_examples/upgrade-adapter/ts/app/hero-detail.directive.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/public/docs/_examples/upgrade-adapter/ts/app/hero-detail.directive.ts b/public/docs/_examples/upgrade-adapter/ts/app/hero-detail.directive.ts index 09af0685fa..8f595ba38f 100644 --- a/public/docs/_examples/upgrade-adapter/ts/app/hero-detail.directive.ts +++ b/public/docs/_examples/upgrade-adapter/ts/app/hero-detail.directive.ts @@ -1,6 +1,7 @@ // #docregion export function heroDetailDirective() { return { + restrict: 'E', scope: {}, bindToController: { hero: '=',