Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2cb73b7

Browse files
Jens Rantilpetebacondarwin
Jens Rantil
authored andcommitted
doc($compile): clarify compile function return value
If a compile function (within a directive) returns a function, it is a post-link function. Closes: angular#2713
1 parent 16a2ce2 commit 2cb73b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guide/directive.ngdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ done in a linking function rather than in a compile function.
445445

446446
A compile function can have a return value which can be either a function or an object.
447447

448-
* returning a function - is equivalent to registering the linking function via the `link` property
449-
of the config object when the compile function is empty.
448+
* returning a (post-link) function - is equivalent to registering the linking function via the
449+
`link` property of the config object when the compile function is empty.
450450

451451
* returning an object with function(s) registered via `pre` and `post` properties - allows you to
452452
control when a linking function should be called during the linking phase. See info about

0 commit comments

Comments
 (0)