From f21e064a80be5036cc707efadfc13ada64645cb9 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 6 Jul 2016 00:52:34 -0400 Subject: [PATCH] docs(guide/Directives): remove confusing definition object message Prior to this point, the doc does not mention returning a postLink function, and all the examples use the definition object form. So, this message is confusing to new readers who may misinterpret "returning a function" as returning the factory function mentioned in the previous section. Since this page is only a "gentle introduction" to directives, and using the definition object is a best practice, I think we should just remove the message altogether. --- docs/content/guide/directive.ngdoc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 85d8c4165acf..6b19db22d84f 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -162,10 +162,6 @@ initialization work here. The function is invoked using {@link auto.$injector#invoke $injector.invoke} which makes it injectable just like a controller. -
-**Best Practice:** Prefer using the definition object over returning a function. -
- We'll go over a few common examples of directives, then dive deep into the different options and compilation process.