Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(guide/directive): remove confusing best practice
Browse files Browse the repository at this point in the history
Prior to this point, the docs do 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, it is best to just remove the message altogether.

Closes #14871
  • Loading branch information
jdai8 authored and gkalpak committed Jul 6, 2016
1 parent b928043 commit c4da2f0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docs/content/guide/directive.ngdoc
Expand Up @@ -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.

<div class="alert alert-success">
**Best Practice:** Prefer using the definition object over returning a function.
</div>


We'll go over a few common examples of directives, then dive deep into the different options
and compilation process.
Expand Down

0 comments on commit c4da2f0

Please sign in to comment.