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

Commit 106ee8f

Browse files
jokeyrhymepetebacondarwin
authored andcommitted
docs(guide): describe directive replace:false
Previous version stated `replace:false` will append template to element. Improve description to accurately state that template will _replace_ the contents of the current element. Closes #2235, #4166
1 parent fc05f5e commit 106ee8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/content/guide/directive.ngdoc

+5-2
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,11 @@ compiler}. The attributes are:
430430
a string value representing the url. In either case, the template URL is passed through {@link
431431
api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
432432

433-
* `replace` - if set to `true` then the template will replace the current element, rather than
434-
append the template to the element.
433+
* `replace` - specify where the template should be inserted. Defaults to `false`.
434+
435+
* `true` - the template will replace the current element.
436+
* `false` - the template will replace the contents of the current element.
437+
435438

436439
* `transclude` - compile the content of the element and make it available to the directive.
437440
Typically used with {@link api/ng.directive:ngTransclude

0 commit comments

Comments
 (0)