Skip to content

Commit bb1d874

Browse files
tboschRichardLitt
authored andcommitted
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 7fbc79b commit bb1d874

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,
@@ -248,7 +247,7 @@
248247
* api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
249248
*
250249
*
251-
* #### `replace`
250+
* #### `replace` ([*DEPRECATED*!], will be removed in next major release)
252251
* specify where the template should be inserted. Defaults to `false`.
253252
*
254253
* * `true` - the template will replace the current element.

0 commit comments

Comments
 (0)