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

Commit 9fd5450

Browse files
committed
docs($compile): deprecate replace directives
BREAKING CHANGE: The `replace` flag for defining directives that replace the element that they are on will be removed in the next major angular version. This feature has difficult semantics (e.g. how attributes are merged) and leads to more problems compared to what it solves. Also, with WebComponents it is normal to have custom elements in the DOM.
1 parent b5391fa commit 9fd5450

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ng/compile.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
* template: '<div></div>', // or // function(tElement, tAttrs) { ... },
6060
* // or
6161
* // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
62-
* replace: false,
6362
* transclude: false,
6463
* restrict: 'A',
6564
* scope: false,
@@ -235,7 +234,7 @@
235234
* api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
236235
*
237236
*
238-
* #### `replace`
237+
* #### `replace` ([*DEPRECATED*!], will be removed in next major release)
239238
* specify where the template should be inserted. Defaults to `false`.
240239
*
241240
* * `true` - the template will replace the current element.

0 commit comments

Comments
 (0)