mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
doc($compile): clarify compile function return value
If a compile function (within a directive) returns a function, it is a post-link function. Closes: #2713
This commit is contained in:
parent
16a2ce2b13
commit
2cb73b71d1
1 changed files with 2 additions and 2 deletions
|
|
@ -445,8 +445,8 @@ done in a linking function rather than in a compile function.
|
|||
|
||||
A compile function can have a return value which can be either a function or an object.
|
||||
|
||||
* returning a function - is equivalent to registering the linking function via the `link` property
|
||||
of the config object when the compile function is empty.
|
||||
* returning a (post-link) function - is equivalent to registering the linking function via the
|
||||
`link` property of the config object when the compile function is empty.
|
||||
|
||||
* returning an object with function(s) registered via `pre` and `post` properties - allows you to
|
||||
control when a linking function should be called during the linking phase. See info about
|
||||
|
|
|
|||
Loading…
Reference in a new issue